From d466100d40ed742e69840480e78e509ad826eb9d Mon Sep 17 00:00:00 2001 From: Limezy Date: Sat, 13 Nov 2021 15:51:37 +0700 Subject: [PATCH] Update restore --- scripts/restore | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/restore b/scripts/restore index 5b4a116..ca19406 100755 --- a/scripts/restore +++ b/scripts/restore @@ -90,18 +90,6 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -#================================================= -# UPDATING A CONFIGURATION -#================================================= - -ynh_secure_remove --file="$final_path/.env" -ynh_script_progression --message="Updating the configuration file..." --time --weight=1 - -ynh_add_config --template="../conf/.env" --destination="$final_path/.env" - -chmod 400 "$final_path/.env" -chown $app:$app "$final_path/.env" - #================================================= # RESTORE MINIO #================================================= @@ -139,6 +127,18 @@ ynh_psql_test_if_first_run ynh_psql_setup_db --db_user=$db_name --db_name=$db_name --db_pwd=$secret_key ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name +#================================================= +# UPDATING A CONFIGURATION +#================================================= + +ynh_secure_remove --file="$final_path/.env" +ynh_script_progression --message="Updating the configuration file..." --time --weight=1 + +ynh_add_config --template="../conf/.env" --destination="$final_path/.env" + +chmod 400 "$final_path/.env" +chown $app:$app "$final_path/.env" + #================================================= # RESTORE SYSTEMD #=================================================