From 94eaf9bb007fddfa20f4ca126adf53eae213db0e Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Sun, 17 Dec 2023 23:14:46 +0100 Subject: [PATCH] Update upgrade add exception if version older than 1.3.1~ynh1 --- scripts/upgrade | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index fc5d71b..be6013b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -63,6 +63,14 @@ chmod 644 "/etc/cron.d/$app" # SPECIFIC UPGRADE #================================================= +if ynh_compare_current_package_version --comparison lt --version 1.3.1~ynh1 +then + ynh_script_progression --message="Updating a configuration file..." --weight=5 + + ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php" + chmod 650 "$install_dir/config.local.php" + chown $app:$app "$install_dir/config.local.php" +fi #================================================= # END OF SCRIPT