Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ file_env() {
unset "$fileVar"
}

get_enabled_apps() {
run_as 'php /var/www/html/occ app:list' \
| sed -n '/^Enabled:$/,/^Disabled:$/p' \
| sed '1d;$d' \
| sed -n 's/^ - \([^:]*\):.*/\1/p' \
| sort
}

# Write PHP session config for Redis to /usr/local/etc/php/conf.d/redis-session.ini
configure_redis_session() {
echo "=> Configuring PHP session handler..."
Expand Down Expand Up @@ -190,7 +198,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
exit 1
fi
echo "Upgrading nextcloud from $installed_version ..."
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
get_enabled_apps > /tmp/list_before
fi
if [ "$(id -u)" = 0 ]; then
rsync_options="-rlDog --chown $user:$group"
Expand Down Expand Up @@ -288,9 +296,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP

run_as 'php /var/www/html/occ upgrade'

run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_after
echo "The following apps have been disabled:"
diff /tmp/list_before /tmp/list_after | grep '<' | cut -d- -f2 | cut -d: -f1
get_enabled_apps > /tmp/list_after
disabled_apps="$(comm -23 /tmp/list_before /tmp/list_after || true)"
if [ -n "$disabled_apps" ]; then
echo "The following apps have been disabled:"
printf '%s\n' "$disabled_apps"
fi
rm -f /tmp/list_before /tmp/list_after

run_path post-upgrade
Expand Down
Loading