diff --git a/actions/deluge b/actions/deluge
index 7e4c5a33a..efbfdee38 100755
--- a/actions/deluge
+++ b/actions/deluge
@@ -18,7 +18,7 @@
#
"""
-Configuration helper for BitTorrent web client
+Configuration helper for BitTorrent web client.
"""
import argparse
@@ -30,6 +30,12 @@ SITE_CONF = '/etc/apache2/conf-available/deluge-web.conf'
SITE_ENABLED = '/etc/apache2/conf-enabled/deluge-web.conf'
APACHE_CONF = '''
+##
+## On all sites, provide Deluge on a default path: /deluge
+##
+## This file is managed and overwritten by Plinth. If you wish to edit
+## it, disable Deluge in Plinth, remove this file and manage it manually.
+##
ProxyPass http://localhost:8112
@@ -77,11 +83,11 @@ def subcommand_enable(_):
if not os.path.isfile(SITE_CONF):
setup()
+ subcommand_start(_)
+
subprocess.check_call(['a2enconf', 'deluge-web'])
subprocess.check_call(['service', 'apache2', 'reload'])
- subcommand_start(_)
-
def subcommand_disable(_):
"""Disable deluge-web site and stop deluge-web."""
diff --git a/plinth/modules/deluge/__init__.py b/plinth/modules/deluge/__init__.py
index d05a08148..129ef1182 100644
--- a/plinth/modules/deluge/__init__.py
+++ b/plinth/modules/deluge/__init__.py
@@ -16,7 +16,7 @@
#
"""
-Plinth module to configure a Deluge web client
+Plinth module to configure a Deluge web client.
"""
from gettext import gettext as _
@@ -28,7 +28,7 @@ depends = ['plinth.modules.apps']
def init():
- """Initialize the BitTorrent module."""
+ """Initialize the Deluge module."""
menu = cfg.main_menu.get('apps:index')
menu.add_urlname(_('BitTorrent (Deluge)'), 'glyphicon-magnet',
'deluge:index', 60)
diff --git a/plinth/modules/deluge/forms.py b/plinth/modules/deluge/forms.py
index 45e1995a5..c67266de9 100644
--- a/plinth/modules/deluge/forms.py
+++ b/plinth/modules/deluge/forms.py
@@ -26,5 +26,5 @@ from gettext import gettext as _
class DelugeForm(forms.Form):
"""Deluge configuration form."""
enabled = forms.BooleanField(
- label=_('Enable Deluge web client'),
+ label=_('Enable Deluge'),
required=False)
diff --git a/plinth/modules/deluge/templates/deluge.html b/plinth/modules/deluge/templates/deluge.html
index 3405a1777..471062c5b 100644
--- a/plinth/modules/deluge/templates/deluge.html
+++ b/plinth/modules/deluge/templates/deluge.html
@@ -49,19 +49,19 @@
{% if status.is_running %}
+
deluge-web is running
{% else %}
+
deluge-web is not running
{% endif %}
diff --git a/plinth/modules/deluge/views.py b/plinth/modules/deluge/views.py
index f732f33f2..b36e45a94 100644
--- a/plinth/modules/deluge/views.py
+++ b/plinth/modules/deluge/views.py
@@ -78,7 +78,7 @@ def get_status():
enabled = (output.strip() == 'yes')
output = actions.run('deluge', ['is-running'])
- is_running = ('yes' in output.strip())
+ is_running = (output.strip() == 'yes')
status = {'enabled': enabled,
'is_running': is_running}