Add logic to start bots when run_on_start isn't set to true

Unless run_on_start is set to true, no worker bots are started when the container is started causing the user to have to manually start bots if they wish to run any manual Diskover operations like finding dupes or hot dirs.
This commit is contained in:
Chris Yocum 2019-07-25 21:26:49 -04:00
parent e3caacdde3
commit 32eac79856

View File

@ -61,11 +61,17 @@ chown -R abc:abc \
/app/diskover \
/config
# run initial retrieval
# run initial retrieval or just start some worker bots
if [ ${DISKOVER_CONF[RUN_ON_START]} == true ]; then
echo "Initial run of dispatcher in progress"
# sleep to allow time for elasticsearch to start
sleep 10
exec \
s6-setuidgid abc /app/dispatcher.sh >> /config/log/diskover/dispatcher.log 2>&1 &
fi
else
echo "Starting worker bots"
# sleep to allow time for elasticsearch to start
sleep 10
exec \
s6-setuidgid abc cd /app/diskover && ./diskover-bot-launcher.sh
fi