add upgrade functions into entrypoints

This commit is contained in:
vcerenu
2024-03-04 12:14:20 -03:00
parent 6e7e8525bb
commit a826212051
2 changed files with 14 additions and 0 deletions
@@ -24,6 +24,11 @@ run_as_other_user_if_needed() {
fi
}
set_correct_permOwner() {
find / -group 1000 -exec chown :999 {} +;
find / -user 1000 -exec chown 999 {} +;
}
# Allow user specify custom CMD, maybe bin/opensearch itself
# for example to directly specify `-E` style parameters for opensearch on k8s
# or simply to run /bin/bash to check the image
@@ -90,4 +95,6 @@ fi
# touch "/var/lib/wazuh-indexer/.flag"
#fi
set_correct_permOwner
run_as_other_user_if_needed /usr/share/wazuh-indexer/bin/opensearch <<<"$KEYSTORE_PASSWORD"