Message log off

This commit is contained in:
Bob Mottram 2016-11-18 16:56:21 +00:00
parent 41f5a8cd5b
commit 5fa0bca2a0
1 changed files with 2 additions and 0 deletions

View File

@ -96,6 +96,7 @@ if [[ "$1" == "on" || "$1" == "On" || "$1" == "ON" ]]; then
sed -i 's|log_error =.*|log_error = /var/log/mysql/error.log|g' /etc/mysql/my.cnf
fi
sed -i 's|mail,news.none.*|mail,news.none -/var/log/messages|g' /etc/rsyslog.conf
sed -i 's|auth,authpriv.\*.*|auth,authpriv.\* /var/log/auth.log|g' /etc/rsyslog.conf
sed -i 's|mail.info.*|mail.info -/var/log/mail.info|g' /etc/rsyslog.conf
sed -i 's|mail.warn.*|mail.warn -/var/log/mail.warn|g' /etc/rsyslog.conf
@ -174,6 +175,7 @@ else
sed -i 's|logtarget.*|logtarget = /dev/null|g' /etc/fail2ban/fail2ban.conf
shred -zu /var/log/fail2ban.*
fi
sed -i 's|mail,news.none.*|mail,news.none /dev/null|g' /etc/rsyslog.conf
sed -i 's|auth,authpriv.\*.*|auth,authpriv.\* /dev/null|g' /etc/rsyslog.conf
sed -i 's|mail.info.*|mail.info /dev/null|g' /etc/rsyslog.conf
sed -i 's|mail.warn.*|mail.warn /dev/null|g' /etc/rsyslog.conf