From 4330606763a2c90dc57850d05ad4da8311f0b10e Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Sun, 26 Mar 2023 10:10:16 -0400 Subject: [PATCH] bug fix for potential permissions error --- root/scripts/PlexNotify.bash | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/root/scripts/PlexNotify.bash b/root/scripts/PlexNotify.bash index 0240e10..80ccb27 100644 --- a/root/scripts/PlexNotify.bash +++ b/root/scripts/PlexNotify.bash @@ -1,5 +1,5 @@ #!/usr/bin/env bash -scriptVersion="1.0.007" +scriptVersion="1.0.1" notfidedBy="Radarr" arrRootFolderPath="$(dirname "$radarr_movie_path")" @@ -14,7 +14,11 @@ movieExtrasPath="$1" if [ -f "/config/logs/PlexNotify.txt" ]; then find /config/logs -type f -name "PlexNotify.txt" -size +1024k -delete fi -touch "/config/logs/PlexNotify.txt" + +if [ ! -f "/config/logs/PlexNotify.txt" ]; then + touch "/config/logs/PlexNotify.txt" + chmod 777 "/config/logs/MovieExtras.txt" +fi exec &> >(tee -a "/config/logs/PlexNotify.txt") log () {