Commit e67c137e authored by 神楽坂玲奈's avatar 神楽坂玲奈

fix

parent 5e8487a6
Pipeline #9228 passed with stages
in 30 seconds
...@@ -35,10 +35,16 @@ _main() { ...@@ -35,10 +35,16 @@ _main() {
# allow the container to be started with `--user` # allow the container to be started with `--user`
if [ "$(id -u)" = '0' ]; then if [ "$(id -u)" = '0' ]; then
find /var/lib/manticore /var/log/manticore /var/run/manticore /etc/manticoresearch \! -user manticore -exec chown manticore '{}' + find /var/lib/manticore /var/log/manticore /var/run/manticore /etc/manticoresearch \! -user manticore -exec chown manticore '{}' +
rm /tmp/reindex.lock
cron
exec gosu manticore "$0" "$@" exec gosu manticore "$0" "$@"
fi fi
fi fi
_replace_conf_from_env _replace_conf_from_env
if [[ ! -f "$CHECKING_FILE" ]]; then
echo "Indexing all..."
indexer --all
fi
exec "$@" exec "$@"
} }
...@@ -80,18 +86,7 @@ _replace_conf_from_env() { ...@@ -80,18 +86,7 @@ _replace_conf_from_env() {
sed -i -E "$sed_query" /etc/manticoresearch/manticore.conf sed -i -E "$sed_query" /etc/manticoresearch/manticore.conf
fi fi
} }
_check_index_all() {
if [[ ! -f "$CHECKING_FILE" ]]; then
echo "Indexing all..."
gosu manticore indexer --all
fi
}
# If we are sourced from elsewhere, don't perform any further actions # If we are sourced from elsewhere, don't perform any further actions
if ! _is_sourced; then if ! _is_sourced; then
_check_index_all
rm -rf /tmp/reindex.lock
cron
_main "$@" _main "$@"
fi fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment