Create tor log

This commit is contained in:
Bob Mottram 2016-11-20 22:02:46 +00:00
parent c2f00aed9f
commit 47f0beb9bf
1 changed files with 4 additions and 0 deletions

View File

@ -83,6 +83,10 @@ 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 root:debian-tor /var/log/tor.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
fi