From 95e81b09064f4d0713f302f5af7cac7a5166e62d Mon Sep 17 00:00:00 2001 From: Sean Alexandre Date: Sun, 27 Sep 2015 08:38:59 -0400 Subject: [PATCH] Adds missing calls to service.notify_enabled() from on_install handlers. Fixes https://github.com/freedombox/Plinth/issues/175 "Many services do not show as enabled in Firewall after install" --- plinth/modules/ikiwiki/views.py | 1 + plinth/modules/privoxy/views.py | 1 + plinth/modules/transmission/views.py | 1 + plinth/modules/xmpp/views.py | 1 + 4 files changed, 4 insertions(+) diff --git a/plinth/modules/ikiwiki/views.py b/plinth/modules/ikiwiki/views.py index a6b0e7028..f08644cc4 100644 --- a/plinth/modules/ikiwiki/views.py +++ b/plinth/modules/ikiwiki/views.py @@ -43,6 +43,7 @@ subsubmenu = [{'url': reverse_lazy('ikiwiki:index'), def on_install(): """Enable Ikiwiki on install.""" actions.superuser_run('ikiwiki', ['setup']) + ikiwiki.service.notify_enabled(None, True) @package.required(['ikiwiki', diff --git a/plinth/modules/privoxy/views.py b/plinth/modules/privoxy/views.py index c779a46e7..03ef96261 100644 --- a/plinth/modules/privoxy/views.py +++ b/plinth/modules/privoxy/views.py @@ -35,6 +35,7 @@ logger = logging.getLogger(__name__) def on_install(): """Notify that the service is now enabled.""" actions.superuser_run('privoxy', ['setup']) + privoxy.service.notify_enabled(None, True) @package.required(['privoxy'], on_install=on_install) diff --git a/plinth/modules/transmission/views.py b/plinth/modules/transmission/views.py index 2ca0dffbe..f14912092 100644 --- a/plinth/modules/transmission/views.py +++ b/plinth/modules/transmission/views.py @@ -39,6 +39,7 @@ TRANSMISSION_CONFIG = '/etc/transmission-daemon/settings.json' def on_install(): """Enable transmission as soon as it is installed.""" actions.superuser_run('transmission', ['enable']) + transmission.service.notify_enabled(None, True) @package.required(['transmission-daemon'], on_install=on_install) diff --git a/plinth/modules/xmpp/views.py b/plinth/modules/xmpp/views.py index 896e1e853..0ee1dbd05 100644 --- a/plinth/modules/xmpp/views.py +++ b/plinth/modules/xmpp/views.py @@ -50,6 +50,7 @@ def before_install(): def on_install(): """Setup jwchat apache conf""" actions.superuser_run('xmpp', ['setup']) + xmpp.service.notify_enabled(None, True) @package.required(['jwchat', 'ejabberd'],