Skip to content
Snippets Groups Projects
Commit ce36ae7c authored by Bob Mottram's avatar Bob Mottram
Browse files

Disable debug log

parent 80eba804
No related branches found
No related tags found
No related merge requests found
......@@ -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|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|news.none;mail.none.*|news.none;mail.none -/var/log/debug|g' /etc/rsyslog.conf
else
if [ -d /etc/tor ]; then
sed -i 's|#Log notice file.*|Log notice file /dev/null|g' /etc/tor/torrc
......@@ -126,6 +127,7 @@ else
fi
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
shred -zu /var/log/php5-fpm.*
fi
if [ -d /etc/nginx ]; then
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|mail.\*.*|mail.\* /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/mail.*
shred -zu /var/log/daemon.*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment