diff --git a/root/scripts/audio.sh b/root/scripts/audio.sh index 1f1a4a5..a86fd04 100644 --- a/root/scripts/audio.sh +++ b/root/scripts/audio.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -scriptVersion="1.0.268" +scriptVersion="1.0.269" if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" if [ "$lidarrUrlBase" == "null" ]; then @@ -38,8 +38,9 @@ log () { echo $m_time" :: Extended Audio :: "$1 } +# auto-clean up log file to reduce space usage if [ -f "/config/logs/Audio.txt" ]; then - rm "/config/logs/Audio.txt" + find /config/logs -type f -name "Audio.txt" -size +5000k -delete sleep 0.01 fi exec &> >(tee -a "/config/logs/Audio.txt")