Update 02-script-setup.bash

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

@ -29,11 +29,27 @@ if [ ! -d "/downloads/complete" ]; then
chmod 0777 "/downloads/incomplete"
fi
if cat "/config/sabnzbd.ini" | grep "/config/scripts" | read; then
sleep 0.1
else
sed -i "s/script_dir = \"\"/script_dir = \"\/config\/scripts\"/g" "/config/sabnzbd.ini"
fi
if cat "/config/sabnzbd.ini" | grep "/downloads/incomplete" | read; then
sleep 0.1
else
sed -i "s/Downloads\/incomplete/\/downloads\/incomplete/g" "/config/sabnzbd.ini"
fi
if cat "/config/sabnzbd.ini" | grep "/downloads/complete" | read; then
sleep 0.1
else
sed -i "s/Downloads\/complete/\/downloads\/complete/g" "/config/sabnzbd.ini"
head -3 "/config/sabnzbd.ini"
fi
if cat "/config/sabnzbd.ini" | grep "[[radarr]]" | read; then
sleep 0.1
else
echo "[[radarr]]" >> "/config/sabnzbd.ini"
echo "priority = -100" >> "/config/sabnzbd.ini"
echo "pp = \"\"" >> "/config/sabnzbd.ini"
@ -42,7 +58,11 @@ echo "script = Default" >> "/config/sabnzbd.ini"
echo "newzbin = \"\"" >> "/config/sabnzbd.ini"
echo "order = 0" >> "/config/sabnzbd.ini"
echo "dir = radarr" >> "/config/sabnzbd.ini"
fi
if cat "/config/sabnzbd.ini" | grep "[[sonarr]]" | read; then
sleep 0.1
else
echo "[[sonarr]]" >> "/config/sabnzbd.ini"
echo "priority = -100" >> "/config/sabnzbd.ini"
echo "pp = \"\"" >> "/config/sabnzbd.ini"
@ -51,7 +71,11 @@ echo "script = Default" >> "/config/sabnzbd.ini"
echo "newzbin = \"\"" >> "/config/sabnzbd.ini"
echo "order = 0" >> "/config/sabnzbd.ini"
echo "dir = sonarr" >> "/config/sabnzbd.ini"
fi
if cat "/config/sabnzbd.ini" | grep "[[lidarr]]" | read; then
sleep 0.1
else
echo "[[lidarr]]" >> "/config/sabnzbd.ini"
echo "priority = -100" >> "/config/sabnzbd.ini"
echo "pp = \"\"" >> "/config/sabnzbd.ini"
@ -60,5 +84,6 @@ echo "script = AudioPostProcessing.bash" >> "/config/sabnzbd.ini"
echo "newzbin = \"\"" >> "/config/sabnzbd.ini"
echo "order = 0" >> "/config/sabnzbd.ini"
echo "dir = lidarr" >> "/config/sabnzbd.ini"
fi
exit 0

Loading…
Cancel
Save