From a7afba8583bc1c21b6cee722510aa4c994dbea67 Mon Sep 17 00:00:00 2001
From: James Valleroy Status
@@ -33,7 +35,7 @@
Hidden Service
-A hidden service will allow your FreedomBox to provide selected
+A hidden service will allow your {{ cfg.box_name }} to provide selected
services (such as OwnCloud or Chat) without revealing its location.
Here is the current configuration:
@@ -52,8 +54,8 @@ Here is the current configuration:
Tor is not installed, please install it. Tor comes pre-installed + with {{ cfg.box_name }}. On any Debian-based system (such as + {{ cfg.box_name }}) you may install it using the command + 'aptitude install tor'.
+ +{% endif %} + {% endblock %} {% block sidebar_right_block %} @@ -80,11 +91,11 @@ A Tor SOCKS port is available on your FreedomBox on TCP portTor is an anonymous communication system. You can learn more about - it from the Tor Project - website. For best protection when web surfing, the Tor Project - recommends that you use - the Tor - Browser Bundle.
+ it from the Tor Project + website. For best protection when web surfing, the Tor Project + recommends that you use the + + Tor Browser. diff --git a/plinth/modules/tor/tor.py b/plinth/modules/tor/tor.py index 7d5cc5895..ab48727d3 100644 --- a/plinth/modules/tor/tor.py +++ b/plinth/modules/tor/tor.py @@ -61,6 +61,7 @@ def index(request): return TemplateResponse(request, 'tor.html', {'title': _('Tor Control Panel'), + 'is_installed': status['is_installed'], 'is_running': status['is_running'], 'tor_ports': status['ports'], 'tor_hs_enabled': status['hs_enabled'], @@ -71,6 +72,9 @@ def index(request): def get_status(): """Return the current status""" + is_installed = actions.superuser_run( + 'tor', + ['get-installed']).strip() == 'installed' is_running = actions.superuser_run('tor', ['is-running']).strip() == 'yes' output = actions.superuser_run('tor-get-ports') @@ -99,7 +103,8 @@ def get_status(): hs_hostname = hs_info[0] hs_ports = hs_info[1] - return {'is_running': is_running, + return {'is_installed': is_installed, + 'is_running': is_running, 'ports': ports, 'hs_enabled': hs_enabled, 'hs_hostname': hs_hostname,