From a37d22abcb586d58299b40ec5c14c47c79167fc7 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Tue, 17 Mar 2020 18:23:22 -0400 Subject: [PATCH] Update 32-sma-setup.bash --- root/etc/cont-init.d/32-sma-setup.bash | 31 ++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/root/etc/cont-init.d/32-sma-setup.bash b/root/etc/cont-init.d/32-sma-setup.bash index 15ead15..8e94fd5 100644 --- a/root/etc/cont-init.d/32-sma-setup.bash +++ b/root/etc/cont-init.d/32-sma-setup.bash @@ -14,6 +14,29 @@ if [ ! -f "/config/scripts/configs/radarr-pp.ini" ]; then chmod 0666 "/config/scripts/configs/radarr-pp.ini" fi +# Remove sonarr log +if [ ! -f "/config/scripts/logs/sonarr-pp.log" ]; then + rm "/config/scripts/configs/sonarr-pp.log" && \ + sleep 0.1 +fi + +# Remove radarr log +if [ ! -f "/config/scripts/logs/radarr-pp.log" ]; then + rm "/config/scripts/configs/radarr-pp.log" && \ + sleep 0.1 +fi + +# create sonarr log +if [ ! -f "/config/scripts/logs/sonarr-pp.log" ]; then + touch "/config/scripts/configs/sonarr-pp.log" +fi + +# create radarr log +if [ ! -f "/config/scripts/configs/radarr-pp.log" ]; then + touch "/config/scripts/configs/radarr-pp.log" +fi + + # remove sickbeard_mp4_automator log if exists if [ -f "/var/log/sma.log" ]; then rm "/var/log/sma.log" @@ -22,8 +45,12 @@ touch "/var/log/sma.log" # Set ffmpeg/ffprobe location -sed -i "s/ffmpeg.exe/ffmpeg/g" "/config/scripts/autoProcess.ini" -sed -i "s/ffprobe.exe/ffprobe/g" "/config/scripts/autoProcess.ini" +sed -i "s/ffmpeg.exe/ffmpeg/g" "/config/scripts/configs/sonarr-pp.ini" +sed -i "s/ffprobe.exe/ffprobe/g" "/config/scripts/configs/sonarr-pp.ini" + +# Set ffmpeg/ffprobe location +sed -i "s/ffmpeg.exe/ffmpeg/g" "/config/scripts/configs/radarr-pp.ini" +sed -i "s/ffprobe.exe/ffprobe/g" "/config/scripts/configs/radarr-pp.ini" chmod 0777 -R "/usr/local/sma"