diff --git a/actions/bittorrent b/actions/deluge
similarity index 94%
rename from actions/bittorrent
rename to actions/deluge
index 77f4ae4b1..4d71d0118 100755
--- a/actions/bittorrent
+++ b/actions/deluge
@@ -29,6 +29,12 @@ import subprocess
SITE_CONF = '/etc/apache2/conf-available/deluge-web.conf'
SITE_ENABLED = '/etc/apache2/conf-enabled/deluge-web.conf'
+APACHE_CONF = '''
+
+ ProxyPass http://localhost:8112
+
+'''
+
def parse_arguments():
"""Return parsed command line arguments as dictionary."""
@@ -70,6 +76,7 @@ def subcommand_enable(_):
"""Enable deluge-web site and start deluge-web."""
if not os.path.isfile(SITE_CONF):
setup()
+
subprocess.check_call(['a2enconf', 'deluge-web'])
subprocess.check_call(['service', 'apache2', 'reload'])
@@ -98,7 +105,7 @@ def subcommand_start(_):
'--name', 'deluge-web',
'--exec', '/usr/bin/deluge-web',
'--chuid', 'debian-deluged',
- '--', '--base=bittorrent'])
+ '--', '--base=deluge'])
def subcommand_stop(_):
@@ -109,11 +116,7 @@ def subcommand_stop(_):
def setup():
"""Perform initial setup for deluge-web site."""
with open(SITE_CONF, 'w') as conffile:
- conffile.writelines([
- '\n',
- ' ProxyPass http://localhost:8112\n',
- '\n',
- ])
+ conffile.write(APACHE_CONF)
def main():
diff --git a/data/etc/plinth/modules-enabled/bittorrent b/data/etc/plinth/modules-enabled/bittorrent
deleted file mode 100644
index cb3cdd997..000000000
--- a/data/etc/plinth/modules-enabled/bittorrent
+++ /dev/null
@@ -1 +0,0 @@
-plinth.modules.bittorrent
diff --git a/data/etc/plinth/modules-enabled/deluge b/data/etc/plinth/modules-enabled/deluge
new file mode 100644
index 000000000..abaebc363
--- /dev/null
+++ b/data/etc/plinth/modules-enabled/deluge
@@ -0,0 +1 @@
+plinth.modules.deluge
diff --git a/plinth/modules/bittorrent/__init__.py b/plinth/modules/deluge/__init__.py
similarity index 89%
rename from plinth/modules/bittorrent/__init__.py
rename to plinth/modules/deluge/__init__.py
index 6e9171f65..d05a08148 100644
--- a/plinth/modules/bittorrent/__init__.py
+++ b/plinth/modules/deluge/__init__.py
@@ -16,7 +16,7 @@
#
"""
-Plinth module to configure a BitTorrent web client (deluge-web)
+Plinth module to configure a Deluge web client
"""
from gettext import gettext as _
@@ -31,4 +31,4 @@ def init():
"""Initialize the BitTorrent module."""
menu = cfg.main_menu.get('apps:index')
menu.add_urlname(_('BitTorrent (Deluge)'), 'glyphicon-magnet',
- 'bittorrent:index', 60)
+ 'deluge:index', 60)
diff --git a/plinth/modules/bittorrent/forms.py b/plinth/modules/deluge/forms.py
similarity index 82%
rename from plinth/modules/bittorrent/forms.py
rename to plinth/modules/deluge/forms.py
index 1cb12ece4..45e1995a5 100644
--- a/plinth/modules/bittorrent/forms.py
+++ b/plinth/modules/deluge/forms.py
@@ -16,15 +16,15 @@
#
"""
-Forms for configuring BitTorrent web client
+Forms for configuring Deluge web client.
"""
from django import forms
from gettext import gettext as _
-class BitTorrentForm(forms.Form):
- """BitTorrent configuration form."""
+class DelugeForm(forms.Form):
+ """Deluge configuration form."""
enabled = forms.BooleanField(
- label=_('Enable BitTorrent web client'),
+ label=_('Enable Deluge web client'),
required=False)
diff --git a/plinth/modules/bittorrent/templates/bittorrent.html b/plinth/modules/deluge/templates/deluge.html
similarity index 89%
rename from plinth/modules/bittorrent/templates/bittorrent.html
rename to plinth/modules/deluge/templates/deluge.html
index 4e0df584e..3405a1777 100644
--- a/plinth/modules/bittorrent/templates/bittorrent.html
+++ b/plinth/modules/deluge/templates/deluge.html
@@ -27,7 +27,7 @@
Deluge is a BitTorrent client that features a Web UI.
When enabled, the Deluge web client will be available from
- /bittorrent path on the web server. The default
+ /deluge path on the web server. The default
password is 'deluge', but you should log in and change it immediately after
enabling this service.
@@ -50,7 +50,7 @@
{% if status.is_running %}
deluge-web is running
-