diff --git a/src/freedombone-controlpanel b/src/freedombone-controlpanel index 281a83e8..49c1108b 100755 --- a/src/freedombone-controlpanel +++ b/src/freedombone-controlpanel @@ -1295,6 +1295,8 @@ function reset_tripwire { return fi clear + echo $'Turing off logging...' + ${PROJECT_NAME}-logging off echo $'Locking down permissions...' lockdown_permissions echo $'Creating configuration...' diff --git a/src/freedombone-logging b/src/freedombone-logging index 2bc9ea74..5e6bbf53 100755 --- a/src/freedombone-logging +++ b/src/freedombone-logging @@ -83,6 +83,9 @@ function turn_logging_off { } function turn_off_rsys_logging { + if grep -q '/var/log/auth.log' /etc/rsyslog.conf; then + return + 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 @@ -106,6 +109,9 @@ function turn_off_rsys_logging { } function turn_on_rsys_logging { + if ! grep -q '/var/log/auth.log' /etc/rsyslog.conf; then + return + 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 diff --git a/src/freedombone-utils-setup b/src/freedombone-utils-setup index 1fe5e0c3..07e30de8 100755 --- a/src/freedombone-utils-setup +++ b/src/freedombone-utils-setup @@ -208,6 +208,9 @@ function install_backports_kernel { } function turn_off_rsys_logging { + if grep -q '/var/log/auth.log' /etc/rsyslog.conf; then + return + 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