Disable debug log

This commit is contained in:
Bob Mottram 2016-11-18 17:15:49 +00:00
parent 80eba804f3
commit ce36ae7cfd
1 changed files with 4 additions and 0 deletions

View File

@ -104,6 +104,7 @@ if [[ "$1" == "on" || "$1" == "On" || "$1" == "ON" ]]; then
sed -i 's|daemon.\*.*|daemon.\* -/var/log/daemon.log|g' /etc/rsyslog.conf sed -i 's|daemon.\*.*|daemon.\* -/var/log/daemon.log|g' /etc/rsyslog.conf
sed -i 's|mail.\*.*|mail.\* -/var/log/mail.log|g' /etc/rsyslog.conf sed -i 's|mail.\*.*|mail.\* -/var/log/mail.log|g' /etc/rsyslog.conf
sed -i 's|user.\*.*|user.\* -/var/log/user.log|g' /etc/rsyslog.conf sed -i 's|user.\*.*|user.\* -/var/log/user.log|g' /etc/rsyslog.conf
sed -i 's|news.none;mail.none.*|news.none;mail.none -/var/log/debug|g' /etc/rsyslog.conf
else else
if [ -d /etc/tor ]; then if [ -d /etc/tor ]; then
sed -i 's|#Log notice file.*|Log notice file /dev/null|g' /etc/tor/torrc sed -i 's|#Log notice file.*|Log notice file /dev/null|g' /etc/tor/torrc
@ -126,6 +127,7 @@ else
fi fi
if [ -f /etc/php5/fpm/php-fpm.conf ]; then if [ -f /etc/php5/fpm/php-fpm.conf ]; then
sed -i 's|error_log =.*|error_log = /dev/null|g' /etc/php5/fpm/php-fpm.conf sed -i 's|error_log =.*|error_log = /dev/null|g' /etc/php5/fpm/php-fpm.conf
shred -zu /var/log/php5-fpm.*
fi fi
if [ -d /etc/nginx ]; then if [ -d /etc/nginx ]; then
for filename in /etc/nginx/sites-available/* ; do for filename in /etc/nginx/sites-available/* ; do
@ -183,6 +185,8 @@ else
sed -i 's|daemon.\*.*|daemon.\* /dev/null|g' /etc/rsyslog.conf sed -i 's|daemon.\*.*|daemon.\* /dev/null|g' /etc/rsyslog.conf
sed -i 's|mail.\*.*|mail.\* /dev/null|g' /etc/rsyslog.conf sed -i 's|mail.\*.*|mail.\* /dev/null|g' /etc/rsyslog.conf
sed -i 's|user.\*.*|user.\* /dev/null|g' /etc/rsyslog.conf sed -i 's|user.\*.*|user.\* /dev/null|g' /etc/rsyslog.conf
sed -i 's|news.none;mail.none.*|news.none;mail.none /dev/null|g' /etc/rsyslog.conf
shred -zu /var/log/debug*
shred -zu /var/log/auth.* shred -zu /var/log/auth.*
shred -zu /var/log/mail.* shred -zu /var/log/mail.*
shred -zu /var/log/daemon.* shred -zu /var/log/daemon.*