From 8e389579d16dae1fee86c1a616647de59bbafa70 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Sat, 15 Jul 2023 16:07:23 -0400 Subject: [PATCH] Update UnmappedFolderCleaner.bash --- radarr/UnmappedFolderCleaner.bash | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/radarr/UnmappedFolderCleaner.bash b/radarr/UnmappedFolderCleaner.bash index 9be1bcd..66f33b7 100644 --- a/radarr/UnmappedFolderCleaner.bash +++ b/radarr/UnmappedFolderCleaner.bash @@ -9,15 +9,15 @@ log () { logfileSetup () { # auto-clean up log file to reduce space usage - if [ -f "/config/logs/UnmappedFolderCleaner.txt" ]; then - find /config/logs -type f -name "UnmappedFolderCleaner.txt" -size +1024k -delete + if [ -f "/config/logs/$scriptName.txt" ]; then + find /config/logs -type f -name "$scriptName.txt" -size +1024k -delete fi - if [ ! -f "/config/logs/UnmappedFolderCleaner.txt" ]; then - touch "/config/logs/UnmappedFolderCleaner.txt" - chmod 666 "/config/logs/UnmappedFolderCleaner.txt" + if [ ! -f "/config/logs/$scriptName.txt" ]; then + touch "/config/logs/$scriptName.txt" + chmod 666 "/config/logs/$scriptName.txt" fi - exec &> >(tee -a "/config/logs/UnmappedFolderCleaner.txt") + exec &> >(tee -a "/config/logs/$scriptName.txt") } verifyConfig () {