From 658e52f6cd724246dc87e25a59bf2eb479ae7e93 Mon Sep 17 00:00:00 2001 From: mridulnagpal Date: Wed, 14 Dec 2016 23:58:24 +0530 Subject: [PATCH] tor: Remove +SocksPort line from instance torrc Not supported by augeas tor lens. --- actions/tor | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/actions/tor b/actions/tor index cb92c0c2c..19d52d56a 100755 --- a/actions/tor +++ b/actions/tor @@ -74,6 +74,13 @@ def subcommand_setup(_): action_utils.service_disable('tor') subprocess.run(['tor-instance-create', 'plinth'], check=True) + with open('/etc/tor/instances/plinth/torrc', 'r') as torrc: + torrc_lines = torrc.readlines() + with open('/etc/tor/instances/plinth/torrc', 'w') as torrc: + for line in torrc_lines: + if not line.startswith('+'): + torrc.write(line + '\n') + aug = augeas_load() aug.set(TOR_CONFIG + '/#comment[last() + 1]',