diff --git a/data/etc/plinth/modules-enabled/syncthing b/data/etc/plinth/modules-enabled/syncthing index 284bd0bd2..57211f61a 100644 --- a/data/etc/plinth/modules-enabled/syncthing +++ b/data/etc/plinth/modules-enabled/syncthing @@ -1 +1 @@ -plinth.modules.syncthing \ No newline at end of file +plinth.modules.syncthing diff --git a/plinth/modules/syncthing/__init__.py b/plinth/modules/syncthing/__init__.py index 6249297a9..d49c94cac 100644 --- a/plinth/modules/syncthing/__init__.py +++ b/plinth/modules/syncthing/__init__.py @@ -14,12 +14,11 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # + """ Plinth module to configure Syncthing. """ -import subprocess - from django.utils.translation import ugettext_lazy as _ from plinth import actions @@ -88,13 +87,14 @@ def setup(helper, old_version=None): def add_shortcut(): + """Helper method to add a shortcut to the frontpage.""" frontpage.add_shortcut( 'syncthing', title, url='/syncthing/', login_required=True) def is_enabled(): """Return whether the module is enabled.""" - return (action_utils.service_is_running('syncthing@syncthing.service') and + return (action_utils.service_is_enabled('syncthing@syncthing') and action_utils.webserver_is_enabled('syncthing-plinth')) diff --git a/plinth/modules/syncthing/urls.py b/plinth/modules/syncthing/urls.py index 49f1ec380..394f62b1e 100644 --- a/plinth/modules/syncthing/urls.py +++ b/plinth/modules/syncthing/urls.py @@ -27,7 +27,7 @@ urlpatterns = [ url(r'^apps/syncthing/$', ServiceView.as_view( service_id=syncthing.managed_services[0], - diagnostics_module_name="syncthing", + diagnostics_module_name='syncthing', description=syncthing.description, show_status_block=True), name='index'),