From 859526c5d8d42034cbebabbf3667ff259d64ad34 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Thu, 19 Mar 2020 19:41:27 -0400 Subject: [PATCH] Update 33-script-setup.bash --- root/etc/cont-init.d/33-script-setup.bash | 46 +---------------------- 1 file changed, 2 insertions(+), 44 deletions(-) diff --git a/root/etc/cont-init.d/33-script-setup.bash b/root/etc/cont-init.d/33-script-setup.bash index 28ed760..7077157 100644 --- a/root/etc/cont-init.d/33-script-setup.bash +++ b/root/etc/cont-init.d/33-script-setup.bash @@ -77,56 +77,14 @@ if cat "/config/sabnzbd.ini" | grep "\[categories\]" | read; then fi # purge default categories - sed -i '/\[categories\]/,+d' "/config/sabnzbd.ini" && \ - sed -i '/\[\[*\]\]/,+7d' "/config/sabnzbd.ini" && \ sed -i '/\[\[software\]\]/,+7d' "/config/sabnzbd.ini" && \ sed -i '/\[\[audio\]\]/,+7d' "/config/sabnzbd.ini" && \ sed -i '/\[\[tv\]\]/,+7d' "/config/sabnzbd.ini" && \ sed -i '/\[\[movies\]\]/,+7d' "/config/sabnzbd.ini" && \ # Add categories - echo "[categories]" >> "/config/sabnzbd.ini" && \ - - # Add * category - echo "[[*]]" >> "/config/sabnzbd.ini" && \ - echo "priority = 0" >> "/config/sabnzbd.ini" && \ - echo "pp = 3" >> "/config/sabnzbd.ini" && \ - echo "name = *" >> "/config/sabnzbd.ini" && \ - echo "script = None" >> "/config/sabnzbd.ini" && \ - echo "newzbin = \"\"" >> "/config/sabnzbd.ini" && \ - echo "order = 0" >> "/config/sabnzbd.ini" && \ - echo "dir = \"\"" >> "/config/sabnzbd.ini" && \ - - # Add radarr category - echo "[[radarr]]" >> "/config/sabnzbd.ini" && \ - echo "priority = -100" >> "/config/sabnzbd.ini" && \ - echo "pp = \"\"" >> "/config/sabnzbd.ini" && \ - echo "name = radarr" >> "/config/sabnzbd.ini" && \ - echo "script = radarr-pp.bash" >> "/config/sabnzbd.ini" && \ - echo "newzbin = \"\"" >> "/config/sabnzbd.ini" && \ - echo "order = 1" >> "/config/sabnzbd.ini" && \ - echo "dir = radarr" >> "/config/sabnzbd.ini" && \ - - # Add sonarr category - echo "[[sonarr]]" >> "/config/sabnzbd.ini" && \ - echo "priority = -100" >> "/config/sabnzbd.ini" && \ - echo "pp = \"\"" >> "/config/sabnzbd.ini" && \ - echo "name = sonarr" >> "/config/sabnzbd.ini" && \ - echo "script = sonarr-pp.bash" >> "/config/sabnzbd.ini" && \ - echo "newzbin = \"\"" >> "/config/sabnzbd.ini" && \ - echo "order = 2" >> "/config/sabnzbd.ini" && \ - echo "dir = sonarr" >> "/config/sabnzbd.ini" && \ - - # Add lidarr category - echo "[[lidarr]]" >> "/config/sabnzbd.ini" && \ - echo "priority = -100" >> "/config/sabnzbd.ini" && \ - echo "pp = \"\"" >> "/config/sabnzbd.ini" && \ - echo "name = lidarr" >> "/config/sabnzbd.ini" && \ - echo "script = audio-pp.bash" >> "/config/sabnzbd.ini" && \ - echo "newzbin = \"\"" >> "/config/sabnzbd.ini" && \ - echo "order = 3" >> "/config/sabnzbd.ini" && \ - echo "dir = lidarr" >> "/config/sabnzbd.ini" - + sed -i '/\[categories\]/a\\[\[radarr\]\]\npriority = -100\npp = ""\nname = radarr\nscript = radarr-pp.bash\nnewzbin = ""\norder = 1\n\dir = radarr\n\[\[sonarr\]\]\npriority = -100\npp = ""\nname = sonarr\nscript = sonarr-pp.bash\nnewzbin = ""\norder = 2\n\dir = sonarr\n\[\[lidarr\]\]\npriority = -100\npp = ""\nname = lidarr\nscript = audio-pp.bash\nnewzbin = ""\norder = 3\n\dir = lidarr' "/config/sabnzbd.ini" + sleep 5 restartsab=$(pgrep s6-supervise | sort -r | head -n1) && \ kill ${restartsab} && \