log file creation change

pull/29/head
RandomNinjaAtk 2 years 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 #!/usr/bin/env bash
scriptVersion="1.0.2" scriptVersion="1.0.3"
arrEventType="$sonarr_eventtype" arrEventType="$sonarr_eventtype"
# auto-clean up log file to reduce space usage # 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 find /config/logs -type f -name "SMA.txt" -size +1024k -delete
fi fi
touch "/config/logs/SMA.txt" if [ ! -f "/config/logs/SMA.txt" ]; then
chmod 666 "/config/logs/SMA.txt" touch "/config/logs/SMA.txt"
chmod 666 "/config/logs/SMA.txt"
fi
exec &> >(tee -a "/config/logs/SMA.txt") exec &> >(tee -a "/config/logs/SMA.txt")
log () { log () {

Loading…
Cancel
Save