check if enabled instead of installed

This commit is contained in:
Daniel Hansson 2020-10-19 00:30:58 +02:00 committed by GitHub
parent 46b89e2308
commit 005b1bd641
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

9
lib.sh
View File

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