From 426bdcb88acd0ba22611aa058a96a2279c0e73c5 Mon Sep 17 00:00:00 2001 From: justinglock40 Date: Sun, 23 Jul 2023 09:10:56 -0400 Subject: [PATCH] Update setup.bash Change SMA config setup to prevent removal of custom sma.ini on container reboot --- sabnzbd/setup.bash | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sabnzbd/setup.bash b/sabnzbd/setup.bash index 53d3e12..1555853 100644 --- a/sabnzbd/setup.bash +++ b/sabnzbd/setup.bash @@ -49,15 +49,16 @@ chmod 777 /config/scripts echo "Downloading SMA config: /config/scripts/sma.ini" curl "https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/sabnzbd/sma.ini" -o /config/sma.ini if [ -f /config/sma.ini ]; then - if [ -f /config/scripts/sma.ini ]; then - echo "Removing /config/scripts/sma.ini" - rm /config/scripts/sma.ini + if [ ! -f /config/scripts/sma.ini ]; then + echo "Importing /config/sma.ini to /config/scripts/sma.ini" + mv /config/sma.ini /config/scripts/sma.ini + chmod 777 /config/scripts/sma.ini + else + echo "File /config/scripts/sma.ini already exists. Not overwriting." fi - echo "Importing /config/sma.ini to /config/scripts/sma.ini" - mv /config/sma.ini /config/scripts/sma.ini - chmod 777 /config/scripts/sma.ini fi + echo "Downloading Video script: /config/scripts/video.bash" curl "https://raw.githubusercontent.com/RandomNinjaAtk/arr-scripts/main/sabnzbd/video.bash" -o /config/video.bash if [ -f /config/video.bash ]; then