From 005b1bd641b2e1007604fa572a81cba5d418f712 Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Mon, 19 Oct 2020 00:30:58 +0200 Subject: [PATCH] check if enabled instead of installed --- lib.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib.sh b/lib.sh index 75cd0239..a46f0db9 100644 --- a/lib.sh +++ b/lib.sh @@ -1074,11 +1074,14 @@ or when a new version of the app is released with the following command: 'sudo -u www-data php ${NCPATH}/occ app:install $1'" rm -Rf "$NCPATH/apps/$1" else - # Enable $1 + # Enable $1 if it's installed but not enabled if is_app_installed "$1" then - nextcloud_occ app:enable "$1" - chown -R www-data:www-data "$NC_APPS_PATH" + if ! is_app_enabled "$1" + then + nextcloud_occ app:enable "$1" + chown -R www-data:www-data "$NC_APPS_PATH" + fi fi fi else