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"
This commit is contained in:
Sean Alexandre 2015-09-27 08:38:59 -04:00 committed by Sunil Mohan Adapa
parent a7735eeb80
commit 95e81b0906
4 changed files with 4 additions and 0 deletions

View File

@ -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',

View File

@ -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)

View File

@ -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)

View File

@ -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'],