|
@@ -95,6 +95,14 @@ if [[ "$1" == "on" || "$1" == "On" || "$1" == "ON" ]]; then
|
95
|
95
|
fi
|
96
|
96
|
sed -i 's|log_error =.*|log_error = /var/log/mysql/error.log|g' /etc/mysql/my.cnf
|
97
|
97
|
fi
|
|
98
|
+
|
|
99
|
+ sed -i 's|auth,authpriv.\*.*|auth,authpriv.\* /var/log/auth.log|g' /etc/rsyslog.conf
|
|
100
|
+ sed -i 's|mail.info.*|mail.info -/var/log/mail.info|g' /etc/rsyslog.conf
|
|
101
|
+ sed -i 's|mail.warn.*|mail.warn -/var/log/mail.warn|g' /etc/rsyslog.conf
|
|
102
|
+ sed -i 's|mail.err.*|mail.err /var/log/mail.err|g' /etc/rsyslog.conf
|
|
103
|
+ sed -i 's|daemon.\*.*|daemon.\* -/var/log/daemon.log|g' /etc/rsyslog.conf
|
|
104
|
+ sed -i 's|mail.\*.*|mail.\* -/var/log/mail.log|g' /etc/rsyslog.conf
|
|
105
|
+ sed -i 's|user.\*.*|user.\* -/var/log/user.log|g' /etc/rsyslog.conf
|
98
|
106
|
else
|
99
|
107
|
if [ -d /etc/tor ]; then
|
100
|
108
|
sed -i 's|#Log notice file.*|Log notice file /dev/null|g' /etc/tor/torrc
|
|
@@ -166,8 +174,21 @@ else
|
166
|
174
|
sed -i 's|logtarget.*|logtarget = /dev/null|g' /etc/fail2ban/fail2ban.conf
|
167
|
175
|
shred -zu /var/log/fail2ban.*
|
168
|
176
|
fi
|
|
177
|
+ sed -i 's|auth,authpriv.\*.*|auth,authpriv.\* /dev/null|g' /etc/rsyslog.conf
|
|
178
|
+ sed -i 's|mail.info.*|mail.info /dev/null|g' /etc/rsyslog.conf
|
|
179
|
+ sed -i 's|mail.warn.*|mail.warn /dev/null|g' /etc/rsyslog.conf
|
|
180
|
+ sed -i 's|mail.err.*|mail.err /dev/null|g' /etc/rsyslog.conf
|
|
181
|
+ sed -i 's|daemon.\*.*|daemon.\* /dev/null|g' /etc/rsyslog.conf
|
|
182
|
+ sed -i 's|mail.\*.*|mail.\* /dev/null|g' /etc/rsyslog.conf
|
|
183
|
+ sed -i 's|user.\*.*|user.\* /dev/null|g' /etc/rsyslog.conf
|
|
184
|
+ shred -zu /var/log/auth.*
|
|
185
|
+ shred -zu /var/log/mail.*
|
|
186
|
+ shred -zu /var/log/daemon.*
|
|
187
|
+ shred -zu /var/log/user.*
|
|
188
|
+ shred -zu /var/log/messages*
|
169
|
189
|
fi
|
170
|
190
|
|
|
191
|
+systemctl restart syslog
|
171
|
192
|
if [ -d /etc/nginx ]; then
|
172
|
193
|
systemctl restart php5-fpm
|
173
|
194
|
systemctl restart nginx
|