From c6975e7afdb56a5a19977155c34d4c518f5e93a2 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 28 Jan 2022 12:03:41 +0100 Subject: [PATCH] Update change_url --- scripts/change_url | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 0d05696..02903b7 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -102,13 +102,21 @@ fi # MODIFY A CONFIG FILE #================================================= -path_url="$new_path" -domain="$new_domain" -mail_pwd=$(ynh_string_random --length=12) +# path_url="$new_path" +# domain="$new_domain" +# mail_pwd=$(ynh_string_random --length=12) -ynh_add_config --template=../conf/.env.example --destination=$final_path/.env +# ynh_add_config --template=../conf/.env.example --destination=$final_path/.env -chmod 600 $final_path/.env +# chmod 600 $final_path/.env + +ynh_script_progression --message="Reconfiguring congif file.." --weight=1 + +sed "s/a APP_URL=.*/a https://${new_domain}${new_path}" $final_path/.env + +pushd $final_path + php$phpversion artisan bookstack:update-url https://${domain}${path_url} https://${new_domain}${new_path} +popd #================================================= # RELOAD NGINX