log file creation change

pull/29/head
RandomNinjaAtk 1 year ago committed by GitHub
parent 13eaad9232
commit c22119a85c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,5 +1,5 @@
#!/usr/bin/env bash
scriptVersion="1.0.2"
scriptVersion="1.0.3"
arrEventType="$sonarr_eventtype"
# auto-clean up log file to reduce space usage
@ -7,8 +7,10 @@ if [ -f "/config/logs/SMA.txt" ]; then
find /config/logs -type f -name "SMA.txt" -size +1024k -delete
fi
touch "/config/logs/SMA.txt"
chmod 666 "/config/logs/SMA.txt"
if [ ! -f "/config/logs/SMA.txt" ]; then
touch "/config/logs/SMA.txt"
chmod 666 "/config/logs/SMA.txt"
fi
exec &> >(tee -a "/config/logs/SMA.txt")
log () {

Loading…
Cancel
Save