From d0bc2be3a388d6248941451071aa1b144b5694be Mon Sep 17 00:00:00 2001 From: Sean Alexandre Date: Sun, 27 Sep 2015 11:15:21 -0400 Subject: [PATCH] owncloud: Adds on_install handler to enable after install. Fixes https://github.com/freedombox/Plinth/issues/224 "Enable ownCloud after install" --- plinth/modules/owncloud/owncloud.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plinth/modules/owncloud/owncloud.py b/plinth/modules/owncloud/owncloud.py index 668f16233..32364ba9d 100644 --- a/plinth/modules/owncloud/owncloud.py +++ b/plinth/modules/owncloud/owncloud.py @@ -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()