Turing rsyslog on or off
This commit is contained in:
parent
bd86c4b19a
commit
259e061dcf
|
@ -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...'
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue