Selaa lähdekoodia

Retain logging for tor so that we can monitor its health

Bob Mottram 6 vuotta sitten
vanhempi
commit
9f4a2ac224
2 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 2
    2
      src/freedombone-image-customise
  2. 1
    1
      src/freedombone-utils-onion

+ 2
- 2
src/freedombone-image-customise Näytä tiedosto

@@ -1762,8 +1762,8 @@ image_setup_utils() {
1762 1762
     chroot "$rootdir" apt-get -yq -t stretch-backports install tor
1763 1763
     chroot "$rootdir" apt-get -yq install connect-proxy
1764 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 1767
     sed -i "s|#AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_MONTH_GB GBytes|g" "$rootdir/etc/tor/torrc"
1768 1768
     sed -i "s|AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_MONTH_GB GBytes|g" "$rootdir/etc/tor/torrc"
1769 1769
     if ! grep -q 'Host *.onion' "$rootdir/root/.ssh/config"; then

+ 1
- 1
src/freedombone-utils-onion Näytä tiedosto

@@ -336,7 +336,7 @@ function install_tor {
336 336
         echo '%include /etc/torrc.d' >> /etc/tor/torrc
337 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 340
     echo "AccountingMax $TOR_MAX_TRAFFIC_PER_MONTH_GB GBytes" > /etc/torrc.d/maxtraffic
341 341
 
342 342
     mark_completed "${FUNCNAME[0]}"