From 5c5fecc6064008a5db75dba557f0f1306039ada4 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Fri, 3 Nov 2023 12:11:52 +0100 Subject: [PATCH] Update upgrade --- scripts/upgrade | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 94a8e6e..e52d722 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -56,6 +56,18 @@ chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:$app "$install_dir" +#================================================= +# RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...) +#================================================= +# UPDATE A CONFIG FILE +#================================================= +ynh_script_progression --message="Updating a configuration file..." --weight=1 + +ynh_add_config --template="../conf/.env" --destination="$install_dir/.env" + +chmod 600 "$install_dir/.env" +chown $app:$app "$install_dir/.env" + #================================================= # SETUP SYSTEMD #================================================= @@ -76,18 +88,6 @@ ynh_use_logrotate --specific_user=$app touch /var/log/$app/$app.log chown -R $app:www-data /var/log/$app/ -#================================================= -# RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...) -#================================================= -# UPDATE A CONFIG FILE -#================================================= -ynh_script_progression --message="Updating a configuration file..." --weight=1 - -ynh_add_config --template="../conf/.env" --destination="$install_dir/.env" - -chmod 600 "$install_dir/.env" -chown $app:$app "$install_dir/.env" - #================================================= # INTEGRATE SERVICE IN YUNOHOST #=================================================