Delete ununsed log files
This commit is contained in:
parent
655a4184af
commit
1c6b926631
|
@ -59,6 +59,7 @@ else
|
||||||
sed -i 's|warn_log.*|warn_log off;|g' $filename
|
sed -i 's|warn_log.*|warn_log off;|g' $filename
|
||||||
sed -i 's|error_log.*|error_log off;|g' $filename
|
sed -i 's|error_log.*|error_log off;|g' $filename
|
||||||
done
|
done
|
||||||
|
shred -zu /var/log/nginx/*
|
||||||
fi
|
fi
|
||||||
if [ -f /etc/init.d/spamassassin ]; then
|
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
|
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
|
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|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
|
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
|
fi
|
||||||
if [ -d /etc/exim4 ]; then
|
if [ -d /etc/exim4 ]; then
|
||||||
sed -i 's|log_selector =.*|log_selector = -all|g' /etc/exim4/conf.d/main/90_exim4-config_log_selector
|
sed -i 's|log_selector =.*|log_selector = -all|g' /etc/exim4/conf.d/main/90_exim4-config_log_selector
|
||||||
|
|
Loading…
Reference in New Issue