add 35
Cette révision appartient à :
+33
-2
@@ -289,9 +289,32 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
|
||||
fi
|
||||
# Upgrade
|
||||
else
|
||||
|
||||
run_path pre-upgrade
|
||||
|
||||
run_as 'php /var/www/html/occ upgrade'
|
||||
echo "Enabling maintenance mode..."
|
||||
run_as 'php /var/www/html/occ maintenance:mode --on'
|
||||
|
||||
# Start Apache early so users get the maintenance page
|
||||
if expr "$1" : "apache" 1>/dev/null; then
|
||||
echo "Starting Apache in background..."
|
||||
apache2-foreground &
|
||||
APACHE_PID=$!
|
||||
|
||||
# Give Apache a few seconds to start
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
echo "Running Nextcloud upgrade..."
|
||||
if run_as 'php /var/www/html/occ upgrade'; then
|
||||
echo "Upgrade completed."
|
||||
|
||||
echo "Disabling maintenance mode..."
|
||||
run_as 'php /var/www/html/occ maintenance:mode --off'
|
||||
else
|
||||
echo "Upgrade failed! Leaving maintenance mode enabled."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
get_enabled_apps > /tmp/list_after
|
||||
disabled_apps="$(comm -23 /tmp/list_before /tmp/list_after || true)"
|
||||
@@ -302,6 +325,7 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
|
||||
rm -f /tmp/list_before /tmp/list_after
|
||||
|
||||
run_path post-upgrade
|
||||
|
||||
fi
|
||||
|
||||
echo "Initializing finished"
|
||||
@@ -327,4 +351,11 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
|
||||
run_path before-starting
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
# If Apache was already started during upgrade,
|
||||
# keep this process attached to it.
|
||||
if [ -n "${APACHE_PID:-}" ]; then
|
||||
echo "Apache already running."
|
||||
wait "$APACHE_PID"
|
||||
else
|
||||
exec "$@"
|
||||
fi
|
||||
Lien symbolique
@@ -0,0 +1 @@
|
||||
34
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur