1.0.054 - New logging to log file process

pull/139/head
RandomNinjaAtk 2 years ago committed by GitHub
parent ebb7fd4df9
commit 8cfcce8c9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
scriptVersion="1.0.053" scriptVersion="1.0.054"
if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then
lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
@ -44,6 +44,15 @@ verifyApiAccess () {
done done
} }
# auto-clean up log file to reduce space usage
if [ -f "/config/logs/Video.txt" ]; then
find /config/logs -type f -name "Video.txt" -size +5000k -delete
sleep 0.01
fi
exec &> >(tee -a "/config/logs/Video.txt")
touch "/config/logs/Video.txt"
chmod 666 "/config/logs/Video.txt"
log "-----------------------------------------------------------------------------" log "-----------------------------------------------------------------------------"
log "|~) _ ._ _| _ ._ _ |\ |o._ o _ |~|_|_|" log "|~) _ ._ _| _ ._ _ |\ |o._ o _ |~|_|_|"
log "|~\(_|| |(_|(_)| | || \||| |_|(_||~| | |<" log "|~\(_|| |(_|(_)| | || \||| |_|(_||~| | |<"
Loading…
Cancel
Save