From 9f4a2ac224361392cbc741e979fad0d3fc7bbaa8 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 4 May 2018 12:47:51 +0100 Subject: [PATCH] Retain logging for tor so that we can monitor its health --- src/freedombone-image-customise | 4 ++-- src/freedombone-utils-onion | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 3aaed257..3cc75fc7 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -1762,8 +1762,8 @@ image_setup_utils() { chroot "$rootdir" apt-get -yq -t stretch-backports install tor chroot "$rootdir" apt-get -yq install connect-proxy chroot "$rootdir" connect-proxy - sed -i 's|#Log notice file.*|Log notice file /dev/null|g' "$rootdir/etc/tor/torrc" - sed -i 's|Log notice file.*|Log notice file /dev/null|g' "$rootdir/etc/tor/torrc" + sed -i 's|#Log notice file.*|Log notice file /var/log/tor/notices.log|g' "$rootdir/etc/tor/torrc" + sed -i 's|Log notice file.*|Log notice file /var/log/tor/notices.log|g' "$rootdir/etc/tor/torrc" sed -i "s|#AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_MONTH_GB GBytes|g" "$rootdir/etc/tor/torrc" sed -i "s|AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_MONTH_GB GBytes|g" "$rootdir/etc/tor/torrc" if ! grep -q 'Host *.onion' "$rootdir/root/.ssh/config"; then diff --git a/src/freedombone-utils-onion b/src/freedombone-utils-onion index e193e5cc..b0cf04f8 100755 --- a/src/freedombone-utils-onion +++ b/src/freedombone-utils-onion @@ -336,7 +336,7 @@ function install_tor { echo '%include /etc/torrc.d' >> /etc/tor/torrc fi - echo 'Log notice file /dev/null' > /etc/torrc.d/logging + echo 'Log notice file /var/log/tor/notices.log' > /etc/torrc.d/logging echo "AccountingMax $TOR_MAX_TRAFFIC_PER_MONTH_GB GBytes" > /etc/torrc.d/maxtraffic mark_completed "${FUNCNAME[0]}"