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:
fonfon authored and Sunil Mohan Adapa committed 2014-10-20 00:14:35 +05:30
1 parent 699a3ac0dc
commit 7794893947
4 files changed
+124 -1

No files matched your search

+7
View File
@@ -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 %}
+3 -1
View File
@@ -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})