From 64a1767fcc89e5bfa6e58f2d83f79c344c094c16 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Fri, 4 Nov 2022 11:57:24 -0400 Subject: [PATCH] 1.0.2 - Use new log file process --- root/scripts/AutoConfig.bash | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/root/scripts/AutoConfig.bash b/root/scripts/AutoConfig.bash index 7670306..43c9e89 100644 --- a/root/scripts/AutoConfig.bash +++ b/root/scripts/AutoConfig.bash @@ -1,5 +1,5 @@ #!/usr/bin/env bash -scriptVersion="1.0.1" +scriptVersion="1.0.2" if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" @@ -16,9 +16,10 @@ fi # auto-clean up log file to reduce space usage if [ -f "/config/logs/AutoConfig.txt" ]; then find /config/logs -type f -name "AutoConfig.txt" -size +1024k -delete + sleep 0.01 fi - -exec &>> "/config/logs/AutoConfig.txt" +exec &> >(tee -a "/config/logs/AutoConfig.txt") +touch "/config/logs/AutoConfig.txt" chmod 666 "/config/logs/AutoConfig.txt" log () {