From 6fc7a4272f382277fcd6dbc474dece506b94ede3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Mennetrier?= Date: Fri, 3 Feb 2023 11:06:59 +0100 Subject: [PATCH] Set new url in humhub configuration when url is changed --- scripts/change_url | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/change_url b/scripts/change_url index 51a3236..469c3f2 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -28,6 +28,7 @@ ynh_script_progression --message="Loading installation settings..." --time --wei # Needed for helper "ynh_add_nginx_config" final_path=$(ynh_app_setting_get --app=$app --key=final_path) +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP @@ -91,6 +92,15 @@ then ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" fi +#================================================= +# UPDATE HUMHUB CONFIGURATION +#================================================= +ynh_script_progression --message="Updating HUMHUB configuration..." --time --weight=1 + +pushd $final_path/protected + php$phpversion yii settings/set base baseUrl http://$new_domain$new_path +popd + #================================================= # RELOAD NGINX #=================================================