From cbcf867a5d2fe57713f45c8645e96f675ba2130b Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Tue, 14 Jun 2022 07:37:56 -0400 Subject: [PATCH] Update 98-script-setup.bash --- root/etc/cont-init.d/98-script-setup.bash | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/root/etc/cont-init.d/98-script-setup.bash b/root/etc/cont-init.d/98-script-setup.bash index a027727..9543235 100644 --- a/root/etc/cont-init.d/98-script-setup.bash +++ b/root/etc/cont-init.d/98-script-setup.bash @@ -1,14 +1,20 @@ #!/usr/bin/with-contenv bash +# create extended directory if missing +if [ ! -d "/config/extended" ]; then + mkdir -p "/config/extended" +fi + # create scripts directory if missing if [ ! -d "/config/extended/scripts" ]; then mkdir -p "/config/extended/scripts" else - echo "Updating scripts..." + echo "Removing previous scripts..." rm -rf /config/extended/scripts/* fi -if [ -d "/config/lidarr-extended/scripts" ]; then +if [ -d "/config/extended/scripts" ]; then + echo "Importing extended scripts..." cp -r /scripts/* /config/extended/scripts/ fi @@ -22,7 +28,6 @@ if [ ! -d "/config/extended/logs" ]; then mkdir -p "/config/extended/logs" fi - # set permissions chmod 777 /config/extended chmod 777 /config/extended/cache