mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
added tor actions: is-running, start, stop; display tor status at tor app page (enabling/disabling will be integrated later)
This commit is contained in:
1 parent
699a3ac0dc
commit
7794893947
4 files changed
+124
-1
No files matched your search
@@ -44,4 +44,11 @@ port-forwarded, if necessary:</p>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
<br style='clear:both'>
|
||||
{% if is_running %}
|
||||
<div class='circle active'></div> Tor is running
|
||||
{% else %}
|
||||
<div class='circle inactive'></div> Tor is not running
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -47,6 +47,8 @@ def index(request):
|
||||
except ValueError:
|
||||
continue
|
||||
|
||||
is_running = actions.superuser_run("tor", ["is-running"]).strip() == "yes"
|
||||
return TemplateResponse(request, 'tor.html',
|
||||
{'title': _('Tor Control Panel'),
|
||||
'tor_ports': tor_ports})
|
||||
'tor_ports': tor_ports,
|
||||
'is_running': is_running})
|
||||
Reference in new issue
Block a user