From 95ef3ae3557e5153ecf13ba285565e3aeab835ab Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Tue, 14 Nov 2023 13:54:22 +0100 Subject: [PATCH] update the .env file at upgrade --- scripts/upgrade | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index f6ee5d6..58f0406 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -48,6 +48,16 @@ chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" +#================================================= +# CONFIGURE THE INSTALL SCRIPT +#================================================= +ynh_script_progression --message="Upgrading .env file..." --weight=1 + +ynh_add_config --template="../conf/.env.production" --destination="$install_dir/.env" +chmod 600 $install_dir/.env +chown $app: "$install_dir/.env" + +set -a; source "$install_dir/.env"; set +a #================================================= # CONFIGURE THEN INSTALL SCRIPT AND DEPENDENCIES