mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-25 09:21:10 +00:00
tor: Don't check if enabled when not installed
Tests: - Install Tor and enable onion service. Restart FreedomBox. During initialization the onion service domain is added. Check in Name Services. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
9b9238188a
commit
7b7d42fe33
@ -87,7 +87,9 @@ class TorApp(app_module.App):
|
||||
self.add(users_and_groups)
|
||||
|
||||
# Register hidden service name with Name Services module.
|
||||
if self.is_enabled() and app_is_running(self):
|
||||
setup_helper = globals()['setup_helper']
|
||||
if setup_helper.get_state() != 'needs-setup' and \
|
||||
self.is_enabled() and app_is_running(self):
|
||||
status = utils.get_status(initialized=False)
|
||||
hostname = status['hs_hostname']
|
||||
services = [int(port['virtport']) for port in status['hs_ports']]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user