owncloud: Adds on_install handler to enable after install.

Fixes https://github.com/freedombox/Plinth/issues/224
"Enable ownCloud after install"
This commit is contained in:
Sean Alexandre 2015-09-27 11:15:21 -04:00 committed by Sunil Mohan Adapa
parent 95e81b0906
commit d0bc2be3a3

View File

@ -51,7 +51,14 @@ def init():
is_external=True, enabled=status['enabled'])
@package.required(['postgresql', 'php5-pgsql', 'owncloud'])
def on_install():
"""Tasks to run after package install."""
actions.superuser_run('owncloud-setup', ['enable'], async=True)
SERVICE.notify_enabled(None, True)
@package.required(['postgresql', 'php5-pgsql', 'owncloud'],
on_install=on_install)
def index(request):
"""Serve the ownCloud configuration page"""
status = get_status()