Merge pull request #1 from RandomNinjaAtk/dev

Update 33-script-setup.bash
pull/3/head
RandomNinjaAtk 5 years ago committed by GitHub
commit 86bd3125b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -77,56 +77,14 @@ if cat "/config/sabnzbd.ini" | grep "\[categories\]" | read; then
fi fi
# purge default categories # 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 '/\[\[software\]\]/,+7d' "/config/sabnzbd.ini" && \
sed -i '/\[\[audio\]\]/,+7d' "/config/sabnzbd.ini" && \ sed -i '/\[\[audio\]\]/,+7d' "/config/sabnzbd.ini" && \
sed -i '/\[\[tv\]\]/,+7d' "/config/sabnzbd.ini" && \ sed -i '/\[\[tv\]\]/,+7d' "/config/sabnzbd.ini" && \
sed -i '/\[\[movies\]\]/,+7d' "/config/sabnzbd.ini" && \ sed -i '/\[\[movies\]\]/,+7d' "/config/sabnzbd.ini" && \
# Add categories # Add categories
echo "[categories]" >> "/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"
# 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"
sleep 5 sleep 5
restartsab=$(pgrep s6-supervise | sort -r | head -n1) && \ restartsab=$(pgrep s6-supervise | sort -r | head -n1) && \
kill ${restartsab} && \ kill ${restartsab} && \

Loading…
Cancel
Save