Delete ununsed log files

This commit is contained in:
Bob Mottram 2015-11-16 13:28:17 +00:00
parent 655a4184af
commit 1c6b926631
1 changed files with 3 additions and 0 deletions

View File

@ -59,6 +59,7 @@ else
sed -i 's|warn_log.*|warn_log off;|g' $filename
sed -i 's|error_log.*|error_log off;|g' $filename
done
shred -zu /var/log/nginx/*
fi
if [ -f /etc/init.d/spamassassin ]; then
sed -i 's|DOPTIONS="-d --pidfile=$PIDFILE"|DOPTIONS="-s null -d --pidfile=$PIDFILE"|g' /etc/init.d/spamassassin
@ -66,6 +67,8 @@ else
if [ -d /etc/prosody ]; then
sed -i 's|info = "/var/log/prosody/prosody.log";|info = "/dev/null";|g' /etc/prosody/prosody.cfg.lua
sed -i 's|error = "/var/log/prosody/prosody.err";|error = "/dev/null";|g' /etc/prosody/prosody.cfg.lua
shred -zu /var/log/prosody/prosody.log
shred -zu /var/log/prosody/prosody.err
fi
if [ -d /etc/exim4 ]; then
sed -i 's|log_selector =.*|log_selector = -all|g' /etc/exim4/conf.d/main/90_exim4-config_log_selector