|
@@ -323,14 +323,6 @@ function install_tor {
|
323
|
323
|
# For torify
|
324
|
324
|
apt-get -yq install torsocks
|
325
|
325
|
|
326
|
|
- # turn off logging
|
327
|
|
- sed -i 's|#Log notice file.*|Log notice file /dev/null|g' /etc/tor/torrc
|
328
|
|
- sed -i 's|Log notice file.*|Log notice file /dev/null|g' /etc/tor/torrc
|
329
|
|
-
|
330
|
|
- # Restrict traffic
|
331
|
|
- sed -i "s|#AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_MONTH_GB GBytes|g" /etc/tor/torrc
|
332
|
|
- sed -i "s|AccountingMax.*|AccountingMax $TOR_MAX_TRAFFIC_PER_MONTH_GB GBytes|g" /etc/tor/torrc
|
333
|
|
-
|
334
|
326
|
if [ ! -d /etc/torrc.d ]; then
|
335
|
327
|
mkdir /etc/torrc.d
|
336
|
328
|
fi
|
|
@@ -339,6 +331,9 @@ function install_tor {
|
339
|
331
|
echo '%include /etc/torrc.d' >> /etc/tor/torrc
|
340
|
332
|
fi
|
341
|
333
|
|
|
334
|
+ echo 'Log notice file /dev/null' > /etc/torrc.d/logging
|
|
335
|
+ echo "AccountingMax $TOR_MAX_TRAFFIC_PER_MONTH_GB GBytes" > /etc/torrc.d/maxtraffic
|
|
336
|
+
|
342
|
337
|
mark_completed "${FUNCNAME[0]}"
|
343
|
338
|
}
|
344
|
339
|
|