Update 33-script-setup.bash

pull/1/head
RandomNinjaAtk 5 years ago committed by GitHub
parent 8615417905
commit a7f32f6a16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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" && \

Loading…
Cancel
Save