mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
transmission: Implement diagnostics
This commit is contained in:
parent
f81f53350f
commit
2926d17104
@ -53,3 +53,16 @@ def is_enabled():
|
|||||||
def is_running():
|
def is_running():
|
||||||
"""Return whether the service is running."""
|
"""Return whether the service is running."""
|
||||||
return action_utils.service_is_running('transmission-daemon')
|
return action_utils.service_is_running('transmission-daemon')
|
||||||
|
|
||||||
|
|
||||||
|
def diagnose():
|
||||||
|
"""Run diagnostics and return the results."""
|
||||||
|
results = []
|
||||||
|
|
||||||
|
results.append(action_utils.diagnose_port_listening(9091, 'tcp4'))
|
||||||
|
results.append(action_utils.diagnose_port_listening(9091, 'tcp6'))
|
||||||
|
results.extend(action_utils.diagnose_url_on_all(
|
||||||
|
'https://{host}/transmission',
|
||||||
|
extra_options=['--no-check-certificate']))
|
||||||
|
|
||||||
|
return results
|
||||||
|
|||||||
@ -32,13 +32,14 @@
|
|||||||
|
|
||||||
<h3>Status</h3>
|
<h3>Status</h3>
|
||||||
|
|
||||||
<p>
|
<p class="running-status-parent">
|
||||||
{% if status.is_running %}
|
{% if status.is_running %}
|
||||||
<span class='running-status active'></span> Transmission daemon is running
|
<span class='running-status active'></span> Transmission daemon is running
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class='running-status inactive'></span> Transmission daemon is not running
|
<span class='running-status inactive'></span> Transmission daemon is not running
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
|
{% include "diagnostics_button.html" with module="transmission" %}
|
||||||
|
|
||||||
<h3>Configuration</h3>
|
<h3>Configuration</h3>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user