Browse Source

Create tor log

Bob Mottram 8 years ago
parent
commit
47f0beb9bf
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      src/freedombone-logging

+ 4
- 0
src/freedombone-logging View File

@@ -83,6 +83,10 @@ if [[ "$1" == "on" || "$1" == "On" || "$1" == "ON" ]]; then
83 83
         sed -i 's|logtarget.*|logtarget = /var/log/fail2ban.log|g' /etc/fail2ban/fail2ban.conf
84 84
     fi
85 85
     if [ -d /etc/tor ]; then
86
+        if [ ! -f /var/log/tor.log ]; then
87
+            touch /var/log/tor.log
88
+            chown root:debian-tor /var/log/tor.log
89
+        fi
86 90
         sed -i 's|#Log notice file.*|Log notice file /var/log/tor.log|g' /etc/tor/torrc
87 91
         sed -i 's|Log notice file.*|Log notice file /var/log/tor.log|g' /etc/tor/torrc
88 92
     fi