diff options
Diffstat (limited to 'abs/core/rsyslog/log_care.sh')
-rw-r--r-- | abs/core/rsyslog/log_care.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/abs/core/rsyslog/log_care.sh b/abs/core/rsyslog/log_care.sh index ea1db56..b0a774b 100644 --- a/abs/core/rsyslog/log_care.sh +++ b/abs/core/rsyslog/log_care.sh @@ -1,4 +1,5 @@ #!/bin/bash +MYTH_RUN_STATUS=1 . /etc/profile YEAR=`date +%Y` LASTYEAR=$(($YEAR - 1)) @@ -7,7 +8,7 @@ do echo "Compressing log files" find /var/log/$DATE* -mtime +1 -exec gzip -9 {} \; echo "Deleting old log files" - find /var/log/$DATE* -mtime +7 -exec rm -rf {} \; + find /var/log/$DATE* -mtime +12 -exec rm -rf {} \; echo "Deleting empty directories" find /var/log/$DATE* -depth -type d -empty -exec rm -rf {} \; done |