Tor logging

This commit is contained in:
Bob Mottram 2017-06-03 19:51:18 +01:00
parent 6e2668ab1c
commit 7c7bb6a28c
1 changed files with 5 additions and 5 deletions

View File

@ -89,12 +89,12 @@ if [[ "$1" == "on" || "$1" == "On" || "$1" == "ON" ]]; then
sed -i 's|logtarget.*|logtarget = /var/log/fail2ban.log|g' /etc/fail2ban/fail2ban.conf
fi
if [ -d /etc/tor ]; then
if [ ! -f /var/log/tor.log ]; then
touch /var/log/tor.log
chown debian-tor:debian-tor /var/log/tor.log
if [ ! -f /var/log/tor/notices.log ]; then
touch /var/log/tor/notices.log
chown debian-tor:debian-tor /var/log/tor/notices.log
fi
sed -i 's|#Log notice file.*|Log notice file /var/log/tor.log|g' /etc/tor/torrc
sed -i 's|Log notice file.*|Log notice file /var/log/tor.log|g' /etc/tor/torrc
sed -i 's|#Log notice file.*|Log notice file /var/log/tor/notices.log|g' /etc/tor/torrc
sed -i 's|Log notice file.*|Log notice file /var/log/tor/notices.log|g' /etc/tor/torrc
fi
if [ -f /etc/mumble-server.ini ]; then
sed -i 's|logfile=.*|logfile=/var/log/mumble-server.log|g' /etc/mumble-server.ini