From a7f32f6a169c4e8e9e94e10bf7c36b6492759061 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Wed, 18 Mar 2020 21:12:19 -0400 Subject: [PATCH] Update 33-script-setup.bash --- root/etc/cont-init.d/33-script-setup.bash | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/root/etc/cont-init.d/33-script-setup.bash b/root/etc/cont-init.d/33-script-setup.bash index 7aa3247..28ed760 100644 --- a/root/etc/cont-init.d/33-script-setup.bash +++ b/root/etc/cont-init.d/33-script-setup.bash @@ -43,7 +43,7 @@ if [ ! -f "/config/sabnzbd.ini" ]; then fi if cat "/config/sabnzbd.ini" | grep "\[categories\]" | read; then - if cat "/config/sabnzbd.ini" | grep "\[\[radarr\]\]" | read; then + if cat "/config/sabnzbd.ini" | grep "/config/scripts" | read; then sleep 0.1 else # Add scripts path @@ -78,6 +78,7 @@ if cat "/config/sabnzbd.ini" | grep "\[categories\]" | read; then # 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" && \ @@ -85,6 +86,16 @@ if cat "/config/sabnzbd.ini" | grep "\[categories\]" | read; then # 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" && \ @@ -115,7 +126,8 @@ if cat "/config/sabnzbd.ini" | grep "\[categories\]" | read; then echo "newzbin = \"\"" >> "/config/sabnzbd.ini" && \ echo "order = 3" >> "/config/sabnzbd.ini" && \ echo "dir = lidarr" >> "/config/sabnzbd.ini" - + + sleep 5 restartsab=$(pgrep s6-supervise | sort -r | head -n1) && \ kill ${restartsab} && \ echo "config updated" && \