|
|
@ -29,27 +29,29 @@ if [ ! -d "/downloads/complete" ]; then
|
|
|
|
chmod 0777 "/downloads/incomplete"
|
|
|
|
chmod 0777 "/downloads/incomplete"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if cat "/config/sabnzbd.ini" | grep "/config/scripts" | read; then
|
|
|
|
if [ -f "/config/sabnzbd.ini" ]; then
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if cat "/config/sabnzbd.ini" | grep "/config/scripts" | read; then
|
|
|
|
sleep 0.1
|
|
|
|
sleep 0.1
|
|
|
|
else
|
|
|
|
else
|
|
|
|
sed -i "s/script_dir = \"\"/script_dir = \"\/config\/scripts\"/g" "/config/sabnzbd.ini"
|
|
|
|
sed -i "s/script_dir = \"\"/script_dir = \"\/config\/scripts\"/g" "/config/sabnzbd.ini"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if cat "/config/sabnzbd.ini" | grep "/downloads/incomplete" | read; then
|
|
|
|
if cat "/config/sabnzbd.ini" | grep "/downloads/incomplete" | read; then
|
|
|
|
sleep 0.1
|
|
|
|
sleep 0.1
|
|
|
|
else
|
|
|
|
else
|
|
|
|
sed -i "s/Downloads\/incomplete/\/downloads\/incomplete/g" "/config/sabnzbd.ini"
|
|
|
|
sed -i "s/Downloads\/incomplete/\/downloads\/incomplete/g" "/config/sabnzbd.ini"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if cat "/config/sabnzbd.ini" | grep "/downloads/complete" | read; then
|
|
|
|
if cat "/config/sabnzbd.ini" | grep "/downloads/complete" | read; then
|
|
|
|
sleep 0.1
|
|
|
|
sleep 0.1
|
|
|
|
else
|
|
|
|
else
|
|
|
|
sed -i "s/Downloads\/complete/\/downloads\/complete/g" "/config/sabnzbd.ini"
|
|
|
|
sed -i "s/Downloads\/complete/\/downloads\/complete/g" "/config/sabnzbd.ini"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if cat "/config/sabnzbd.ini" | grep "\[\[radarr\]\]" | read; then
|
|
|
|
if cat "/config/sabnzbd.ini" | grep "\[\[radarr\]\]" | read; then
|
|
|
|
sleep 0.1
|
|
|
|
sleep 0.1
|
|
|
|
else
|
|
|
|
else
|
|
|
|
sed -i '/\[\[movies\]\]/,+7d' "/config/sabnzbd.ini"
|
|
|
|
sed -i '/\[\[movies\]\]/,+7d' "/config/sabnzbd.ini"
|
|
|
|
echo "[[radarr]]" >> "/config/sabnzbd.ini"
|
|
|
|
echo "[[radarr]]" >> "/config/sabnzbd.ini"
|
|
|
|
echo "priority = -100" >> "/config/sabnzbd.ini"
|
|
|
|
echo "priority = -100" >> "/config/sabnzbd.ini"
|
|
|
@ -59,11 +61,11 @@ else
|
|
|
|
echo "newzbin = \"\"" >> "/config/sabnzbd.ini"
|
|
|
|
echo "newzbin = \"\"" >> "/config/sabnzbd.ini"
|
|
|
|
echo "order = 1" >> "/config/sabnzbd.ini"
|
|
|
|
echo "order = 1" >> "/config/sabnzbd.ini"
|
|
|
|
echo "dir = radarr" >> "/config/sabnzbd.ini"
|
|
|
|
echo "dir = radarr" >> "/config/sabnzbd.ini"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if cat "/config/sabnzbd.ini" | grep "\[\[sonarr\]\]" | read; then
|
|
|
|
if cat "/config/sabnzbd.ini" | grep "\[\[sonarr\]\]" | read; then
|
|
|
|
sleep 0.1
|
|
|
|
sleep 0.1
|
|
|
|
else
|
|
|
|
else
|
|
|
|
sed -i '/\[\[tv\]\]/,+7d' "/config/sabnzbd.ini"
|
|
|
|
sed -i '/\[\[tv\]\]/,+7d' "/config/sabnzbd.ini"
|
|
|
|
echo "[[sonarr]]" >> "/config/sabnzbd.ini"
|
|
|
|
echo "[[sonarr]]" >> "/config/sabnzbd.ini"
|
|
|
|
echo "priority = -100" >> "/config/sabnzbd.ini"
|
|
|
|
echo "priority = -100" >> "/config/sabnzbd.ini"
|
|
|
@ -73,11 +75,11 @@ else
|
|
|
|
echo "newzbin = \"\"" >> "/config/sabnzbd.ini"
|
|
|
|
echo "newzbin = \"\"" >> "/config/sabnzbd.ini"
|
|
|
|
echo "order = 2" >> "/config/sabnzbd.ini"
|
|
|
|
echo "order = 2" >> "/config/sabnzbd.ini"
|
|
|
|
echo "dir = sonarr" >> "/config/sabnzbd.ini"
|
|
|
|
echo "dir = sonarr" >> "/config/sabnzbd.ini"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if cat "/config/sabnzbd.ini" | grep "\[\[lidarr\]\]" | read; then
|
|
|
|
if cat "/config/sabnzbd.ini" | grep "\[\[lidarr\]\]" | read; then
|
|
|
|
sleep 0.1
|
|
|
|
sleep 0.1
|
|
|
|
else
|
|
|
|
else
|
|
|
|
sed -i '/\[\[audio\]\]/,+7d' "/config/sabnzbd.ini"
|
|
|
|
sed -i '/\[\[audio\]\]/,+7d' "/config/sabnzbd.ini"
|
|
|
|
echo "[[lidarr]]" >> "/config/sabnzbd.ini"
|
|
|
|
echo "[[lidarr]]" >> "/config/sabnzbd.ini"
|
|
|
|
echo "priority = -100" >> "/config/sabnzbd.ini"
|
|
|
|
echo "priority = -100" >> "/config/sabnzbd.ini"
|
|
|
@ -87,6 +89,8 @@ else
|
|
|
|
echo "newzbin = \"\"" >> "/config/sabnzbd.ini"
|
|
|
|
echo "newzbin = \"\"" >> "/config/sabnzbd.ini"
|
|
|
|
echo "order = 3" >> "/config/sabnzbd.ini"
|
|
|
|
echo "order = 3" >> "/config/sabnzbd.ini"
|
|
|
|
echo "dir = lidarr" >> "/config/sabnzbd.ini"
|
|
|
|
echo "dir = lidarr" >> "/config/sabnzbd.ini"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
exit 0
|
|
|
|