Bläddra i källkod

Retain logging for tor so that we can monitor its health

Bob Mottram 7 år sedan
förälder
incheckning
9f4a2ac224
2 ändrade filer med 3 tillägg och 3 borttagningar
  1. 2
    2
      src/freedombone-image-customise
  2. 1
    1
      src/freedombone-utils-onion

+ 2
- 2
src/freedombone-image-customise Visa fil

1762
     chroot "$rootdir" apt-get -yq -t stretch-backports install tor
1762
     chroot "$rootdir" apt-get -yq -t stretch-backports install tor
1763
     chroot "$rootdir" apt-get -yq install connect-proxy
1763
     chroot "$rootdir" apt-get -yq install connect-proxy
1764
     chroot "$rootdir" connect-proxy
1764
     chroot "$rootdir" connect-proxy
1765
-    sed -i 's|#Log notice file.*|Log notice file /dev/null|g' "$rootdir/etc/tor/torrc"
1766
-    sed -i 's|Log notice file.*|Log notice file /dev/null|g' "$rootdir/etc/tor/torrc"
1765
+    sed -i 's|#Log notice file.*|Log notice file /var/log/tor/notices.log|g' "$rootdir/etc/tor/torrc"
1766
+    sed -i 's|Log notice file.*|Log notice file /var/log/tor/notices.log|g' "$rootdir/etc/tor/torrc"
1767
     sed -i "s|#AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_MONTH_GB GBytes|g" "$rootdir/etc/tor/torrc"
1767
     sed -i "s|#AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_MONTH_GB GBytes|g" "$rootdir/etc/tor/torrc"
1768
     sed -i "s|AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_MONTH_GB GBytes|g" "$rootdir/etc/tor/torrc"
1768
     sed -i "s|AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_MONTH_GB GBytes|g" "$rootdir/etc/tor/torrc"
1769
     if ! grep -q 'Host *.onion' "$rootdir/root/.ssh/config"; then
1769
     if ! grep -q 'Host *.onion' "$rootdir/root/.ssh/config"; then

+ 1
- 1
src/freedombone-utils-onion Visa fil

336
         echo '%include /etc/torrc.d' >> /etc/tor/torrc
336
         echo '%include /etc/torrc.d' >> /etc/tor/torrc
337
     fi
337
     fi
338
 
338
 
339
-    echo 'Log notice file /dev/null' > /etc/torrc.d/logging
339
+    echo 'Log notice file /var/log/tor/notices.log' > /etc/torrc.d/logging
340
     echo "AccountingMax $TOR_MAX_TRAFFIC_PER_MONTH_GB GBytes" > /etc/torrc.d/maxtraffic
340
     echo "AccountingMax $TOR_MAX_TRAFFIC_PER_MONTH_GB GBytes" > /etc/torrc.d/maxtraffic
341
 
341
 
342
     mark_completed "${FUNCNAME[0]}"
342
     mark_completed "${FUNCNAME[0]}"