Retain logging for tor so that we can monitor its health
This commit is contained in:
parent
cecd4d876c
commit
9f4a2ac224
|
@ -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
|
||||
|
|
|
@ -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]}"
|
||||
|
|
Loading…
Reference in New Issue