From 32eac79856db74df0f953e1a49889f6ba31c3dcc Mon Sep 17 00:00:00 2001 From: Chris Yocum Date: Thu, 25 Jul 2019 21:26:49 -0400 Subject: [PATCH] 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. --- root/etc/cont-init.d/50-diskover-config | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/root/etc/cont-init.d/50-diskover-config b/root/etc/cont-init.d/50-diskover-config index 2c4bb1d..cbd83be 100644 --- a/root/etc/cont-init.d/50-diskover-config +++ b/root/etc/cont-init.d/50-diskover-config @@ -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 \ No newline at end of file