mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
tor: Remove +SocksPort line from instance torrc
Not supported by augeas tor lens.
This commit is contained in:
parent
7afd5dd32d
commit
658e52f6cd
@ -74,6 +74,13 @@ def subcommand_setup(_):
|
|||||||
action_utils.service_disable('tor')
|
action_utils.service_disable('tor')
|
||||||
subprocess.run(['tor-instance-create', 'plinth'], check=True)
|
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 = augeas_load()
|
||||||
|
|
||||||
aug.set(TOR_CONFIG + '/#comment[last() + 1]',
|
aug.set(TOR_CONFIG + '/#comment[last() + 1]',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user