diff --git a/src/freedombone-logging b/src/freedombone-logging index f938cf3e..068588f0 100755 --- a/src/freedombone-logging +++ b/src/freedombone-logging @@ -95,6 +95,14 @@ if [[ "$1" == "on" || "$1" == "On" || "$1" == "ON" ]]; then fi sed -i 's|log_error =.*|log_error = /var/log/mysql/error.log|g' /etc/mysql/my.cnf fi + + 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 + sed -i 's|mail.err.*|mail.err /var/log/mail.err|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|user.\*.*|user.\* -/var/log/user.log|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 @@ -166,8 +174,21 @@ else sed -i 's|logtarget.*|logtarget = /dev/null|g' /etc/fail2ban/fail2ban.conf shred -zu /var/log/fail2ban.* fi + 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 + sed -i 's|mail.err.*|mail.err /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|user.\*.*|user.\* /dev/null|g' /etc/rsyslog.conf + shred -zu /var/log/auth.* + shred -zu /var/log/mail.* + shred -zu /var/log/daemon.* + shred -zu /var/log/user.* + shred -zu /var/log/messages* fi +systemctl restart syslog if [ -d /etc/nginx ]; then systemctl restart php5-fpm systemctl restart nginx