From 10c7976d054d1b17d884185c4a1e35dc7b2d0350 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 8 Jan 2024 23:00:49 +0100 Subject: [PATCH] During upgrade, the backup of config.php should occurr before the maintenance mode is set to on, otherwise the restored version will have maintenance=true and appear as manually modified.. --- scripts/upgrade | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 6950f48..ac1c1e1 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -221,12 +221,12 @@ EOF # Install the next nextcloud version in $tmpdir ynh_setup_source --dest_dir="$tmpdir" - # Enable maintenance mode - exec_occ maintenance:mode --on - # Backup the config file in the temp dir cp -a "$install_dir/config/config.php" "$tmpdir/config/config.php" + # Enable maintenance mode + exec_occ maintenance:mode --on + # Backup 3rd party applications from the current Nextcloud # But do not overwrite if there is any upgrade # (apps directory already exists in Nextcloud archive)