From 2a42ab925c57a75161779e9f6b00ff5f11e3f387 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Thu, 16 Jun 2022 13:22:32 +0000 Subject: [PATCH] prevent log file from consuming to much space... --- root/scripts/PlexNotify.bash | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/root/scripts/PlexNotify.bash b/root/scripts/PlexNotify.bash index e64ce30..6c196dc 100644 --- a/root/scripts/PlexNotify.bash +++ b/root/scripts/PlexNotify.bash @@ -1,5 +1,9 @@ #!/usr/bin/env bash lidarrRootFolderPath="$(dirname "$lidarr_artist_path")" +# auto-clean up log file to reduce space usage +if [ -f "/config/logs/PlexNotify.txt" ]; then + find /config/logs -type f -name "PlexNotify.txt" -size +1024k -delete +fi exec &>> "/config/logs/PlexNotify.txt" chmod 777 "/config/logs/PlexNotify.txt"