|
|
|
|
82
|
sed -i 's|loglevel.*|loglevel = 3|g' /etc/fail2ban/fail2ban.conf
|
82
|
sed -i 's|loglevel.*|loglevel = 3|g' /etc/fail2ban/fail2ban.conf
|
83
|
sed -i 's|logtarget.*|logtarget = /var/log/fail2ban.log|g' /etc/fail2ban/fail2ban.conf
|
83
|
sed -i 's|logtarget.*|logtarget = /var/log/fail2ban.log|g' /etc/fail2ban/fail2ban.conf
|
84
|
fi
|
84
|
fi
|
|
|
85
|
+ if [ -f /var/lib/matrix/homeserver.yaml ]; then
|
|
|
86
|
+ sed -i 's|log_file:.*|log_file: /var/lib/matrix/homeserver.log|g' /var/lib/matrix/homeserver.yaml
|
|
|
87
|
+ fi
|
85
|
if [ -d /etc/tor ]; then
|
88
|
if [ -d /etc/tor ]; then
|
86
|
if [ ! -f /var/log/tor.log ]; then
|
89
|
if [ ! -f /var/log/tor.log ]; then
|
87
|
touch /var/log/tor.log
|
90
|
touch /var/log/tor.log
|
|
|
|
|
143
|
fi
|
146
|
fi
|
144
|
turn_on_rsys_logging
|
147
|
turn_on_rsys_logging
|
145
|
else
|
148
|
else
|
|
|
149
|
+ if [ -f /var/lib/matrix/homeserver.yaml ]; then
|
|
|
150
|
+ sed -i 's|log_file:.*|log_file: /dev/null|g' /var/lib/matrix/homeserver.yaml
|
|
|
151
|
+ fi
|
146
|
if [ -d /etc/tor ]; then
|
152
|
if [ -d /etc/tor ]; then
|
147
|
sed -i 's|#Log notice file.*|Log notice file /dev/null|g' /etc/tor/torrc
|
153
|
sed -i 's|#Log notice file.*|Log notice file /dev/null|g' /etc/tor/torrc
|
148
|
sed -i 's|Log notice file.*|Log notice file /dev/null|g' /etc/tor/torrc
|
154
|
sed -i 's|Log notice file.*|Log notice file /dev/null|g' /etc/tor/torrc
|
|
|
|
|
255
|
if [ -d /etc/fail2ban ]; then
|
261
|
if [ -d /etc/fail2ban ]; then
|
256
|
systemctl restart fail2ban
|
262
|
systemctl restart fail2ban
|
257
|
fi
|
263
|
fi
|
|
|
264
|
+if [ -f /var/lib/matrix/homeserver.yaml ]; then
|
|
|
265
|
+ systemctl restart matrix
|
|
|
266
|
+fi
|
258
|
|
267
|
|
259
|
exit 0
|
268
|
exit 0
|