|
|
@ -19,15 +19,15 @@ if [ ! -f "/config/scripts/AudioPostProcessing.bash" ]; then
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Create downloads incomplete directory
|
|
|
|
# Create downloads incomplete directory
|
|
|
|
if [ ! -d "/downloads/incomplete" ]; then
|
|
|
|
if [ ! -d "/downloads/sabnzbd/incomplete" ]; then
|
|
|
|
mkdir -p "/downloads/incomplete"
|
|
|
|
mkdir -p "/downloads/sabnzbd/incomplete"
|
|
|
|
chmod 0777 "/downloads/incomplete"
|
|
|
|
chmod 0777 "/downloads/sabnzbd/incomplete"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Create downloads complete directory
|
|
|
|
# Create downloads complete directory
|
|
|
|
if [ ! -d "/downloads/complete" ]; then
|
|
|
|
if [ ! -d "/downloads/sabnzbd/complete" ]; then
|
|
|
|
mkdir -p "/downloads/complete"
|
|
|
|
mkdir -p "/downloads/sabnzbd/complete"
|
|
|
|
chmod 0777 "/downloads/incomplete"
|
|
|
|
chmod 0777 "/downloads/sabnzbd/complete"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -f "/config/scripts/sab-config-updated" ]; then
|
|
|
|
if [ ! -f "/config/scripts/sab-config-updated" ]; then
|
|
|
@ -44,17 +44,17 @@ if [ ! -f "/config/scripts/sab-config-updated" ]; then
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Correct incomplete path
|
|
|
|
# Correct incomplete path
|
|
|
|
if cat "/config/sabnzbd.ini" | grep "/downloads/incomplete" | read; then
|
|
|
|
if cat "/config/sabnzbd.ini" | grep "/downloads/sabnzbd/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\/sabnzbd\/incomplete/g" "/config/sabnzbd.ini"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Correct complete path
|
|
|
|
# Correct complete path
|
|
|
|
if cat "/config/sabnzbd.ini" | grep "/downloads/complete" | read; then
|
|
|
|
if cat "/config/sabnzbd.ini" | grep "/downloads/sabnzbd/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\/sabnzbd\/complete/g" "/config/sabnzbd.ini"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Enable script failure
|
|
|
|
# Enable script failure
|
|
|
|