mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
Add comment to mark end of Plinth Hidden Service configuration block.
This commit is contained in:
parent
4e493c1ac5
commit
500cfd11e3
@ -101,6 +101,7 @@ def subcommand_enable_hs(_):
|
||||
lines.append("HiddenServiceDir /var/lib/tor/hidden_service/\n")
|
||||
lines.append("HiddenServicePort 80 127.0.0.1:80\n")
|
||||
lines.append("HiddenServicePort 443 127.0.0.1:443\n")
|
||||
lines.append("# end of Plinth Hidden Service config\n")
|
||||
|
||||
with open(TOR_CONFIG, 'w') as conffile:
|
||||
conffile.writelines(lines)
|
||||
@ -121,7 +122,11 @@ def subcommand_disable_hs(_):
|
||||
removing = False
|
||||
for line in lines:
|
||||
if removing:
|
||||
if not line.startswith("HiddenService"):
|
||||
if line.startswith("# end of Plinth Hidden Service config"):
|
||||
# last line of Plinth hidden service block
|
||||
# stop removing after this line
|
||||
removing = False
|
||||
elif not line.startswith("HiddenService"):
|
||||
# end of Plinth hidden service block
|
||||
# stop removing lines
|
||||
removing = False
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user