From 301a90169f0c586b9d293110814460e5bb0cd790 Mon Sep 17 00:00:00 2001 From: Sebastian Gumprich Date: Sun, 19 Sep 2021 20:18:54 +0200 Subject: [PATCH] make installation work --- scripts/upgrade | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 7d9c0de..739633c 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -72,7 +72,7 @@ then ynh_script_progression --message="Upgrading source files..." --time --weight=1 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" --keep="$final_path/.env" + ynh_setup_source --dest_dir="$final_path" --keep=".env" fi # FIXME: this should be managed by the core in the future @@ -118,6 +118,20 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." # Create a dedicated php-fpm config ynh_add_fpm_config --package="$extra_php_dependencies" +#================================================= +# UPDATE A CONFIG FILE +#================================================= + +if [ "$upgrade_type" == "UPGRADE_APP" ] +then + ynh_script_progression --message="Updating a configuration file..." + + ynh_add_config --template="default.env" --destination="$final_path/.env" + + chmod 400 "$final_path/.env" + chown $app:$app "$final_path/.env" +fi + #================================================= # UPGRADE DATABASE #=================================================