fix not hooking conf in if already setup
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
MrMeeb 2023-05-27 18:15:12 +00:00
parent f3dc829111
commit bfbc0e22d7

View File

@ -42,9 +42,19 @@ then
#Copying config directory to /config/cronicle/conf if not already there, then linking back into Cronicle
if [ ! -d /config/cronicle/conf ]
then
echo "Config dir is missing, creating."
cp -r /app/cronicle/conf /config/cronicle/conf
rm -rf /app/cronicle/conf
ln -s /config/cronicle/conf /app/cronicle/conf
else
echo "Config dir already exists. Doesn't need creating."
echo "Linking persistent config dir back into Cronicle."
rm -rf /app/cronicle/conf
ln -s /config/cronicle/conf /app/cronicle/conf
fi
if [ ! -f /config/cronicle/data/.setup_done ]
@ -60,8 +70,6 @@ then
rm -rf /app/cronicle/data
ln -s /config/cronicle/data /app/cronicle/data
#exec node /app/cronicle/lib/main.js --color 1
else
echo "Setup already completed."
@ -69,8 +77,6 @@ then
rm -rf /app/cronicle/data
ln -s /config/cronicle/data /app/cronicle/data
#exec node /app/cronicle/lib/main.js --color 1
fi
elif [ $MODE == "worker" ]
@ -89,9 +95,7 @@ then
#Removing default config.json and linking provided one back into Cronicle
rm -rf /app/cronicle/conf/config.json
ln -s /config/config.json /app/cronicle/conf/config.json
#exec node /app/cronicle/lib/main.js --color 1
ln -s /config/cronicle/conf/config.json /app/cronicle/conf/config.json
fi
@ -99,9 +103,4 @@ else
echo "'$MODE' is not a recognised appion for the MODE environment variable. Accepted appions are 'manager' and 'worker'."
fi
#echo "Applying permissions to /config and /app (this can take a while on first run or after PUID/PGID changes)"
#chmod "=rwx" /config
#chown -R mrmeeb:mrmeeb /config
#chown -R mrmeeb:mrmeeb /app
fi