mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-01-01 03:22:48 +08:00
Merge pull request #1654 from nextcloud/enh/noid/allow-enable-apps
allow to enable shipped apps during startup
This commit is contained in:
commit
316fd3460c
1 changed files with 13 additions and 1 deletions
|
@ -263,7 +263,19 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then
|
|||
if [ -n "$STARTUP_APPS" ]; then
|
||||
read -ra STARTUP_APPS_ARRAY <<< "$STARTUP_APPS"
|
||||
for app in "${STARTUP_APPS_ARRAY[@]}"; do
|
||||
php /var/www/html/occ app:install "$app"
|
||||
if ! echo "$app" | grep -q '^-'; then
|
||||
if [ -z "$(find /var/www/html/apps -type d -maxdepth 1 -mindepth 1 -name "$app" )" ]; then
|
||||
# If not shipped, install and enable the app
|
||||
php /var/www/html/occ app:install "$app"
|
||||
else
|
||||
# If shipped, enable the app
|
||||
php /var/www/html/occ app:enable "$app"
|
||||
fi
|
||||
else
|
||||
app="${app#-}"
|
||||
# Disable the app if '-' was provided in front of the appid
|
||||
php /var/www/html/occ app:disable "$app"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue