allow to adjust Nextcloud apps that get installed upon first startup

Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
szaimen 2022-09-26 20:27:35 +02:00 committed by Simon L
parent 54f39b5334
commit 029b6ea797
9 changed files with 33 additions and 8 deletions

View file

@ -165,7 +165,15 @@ if [ -n "$TRUSTED_CACERTS_DIR" ]; then
if ! echo "$TRUSTED_CACERTS_DIR" | grep -q "^/" || echo "$TRUSTED_CACERTS_DIR" | grep -q "/$"; then
echo "You've set TRUSTED_CACERTS_DIR but not to an allowed value.
It should be an absolute path to a directory that starts with '/' but not end with '/'.
It is set to '$TRUSTED_CACERTS_DIR '."
It is set to '$TRUSTED_CACERTS_DIR'."
exit 1
fi
fi
if [ -n "$NEXTCLOUD_STARTUP_APPS" ]; then
if ! echo "$NEXTCLOUD_STARTUP_APPS" | grep -q "^[a-z _-]\+$"; then
echo "You've set NEXTCLOUD_STARTUP_APPS but not to an allowed value.
It needs to be a string. Allowed are small letters a-z, spaces, hyphens and '_'.
It is set to '$NEXTCLOUD_STARTUP_APPS'."
exit 1
fi
fi

View file

@ -229,12 +229,12 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then
# php /var/www/html/occ config:app:set updatenotification notify_groups --value="[]"
# Install some apps by default
php /var/www/html/occ app:install twofactor_totp
php /var/www/html/occ app:install deck
php /var/www/html/occ app:install tasks
php /var/www/html/occ app:install calendar
php /var/www/html/occ app:install contacts
php /var/www/html/occ app:install apporder
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"
done
fi
#upgrade
else