diff --git a/scripts/change_url b/scripts/change_url index a0d5a81..e7ade7c 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -33,7 +33,6 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) phpversion=$YNH_PHP_VERSION -app_url_domain=$(ynh_app_setting_get --app=$app --key=app_url_domain) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP @@ -105,9 +104,10 @@ fi ynh_script_progression --message="Reconfiguring congif file.." --weight=1 new_app_url_domain="https://${new_domain}${new_path%/}" +old_app_url_domain="https://${old_domain}${old_path%/}" pushd $final_path - yes | php$phpversion artisan bookstack:update-url $app_url_domain $new_app_url_domain + yes | php$phpversion artisan bookstack:update-url $old_app_url_domain $new_app_url_domain popd sed -i "/APP_URL=/c\APP_URL=$new_app_url_domain" $final_path/.env diff --git a/scripts/upgrade b/scripts/upgrade index f92a40e..b9e2380 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -26,7 +26,6 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) phpversion=$YNH_PHP_VERSION redis_db=$(ynh_app_setting_get --app=$app --key=redis_db) mail_pwd=$(ynh_string_random --length=12) -app_url_domain=$(ynh_app_setting_get --app=$app --key=app_url_domain) #================================================= # CHECK VERSION @@ -53,12 +52,6 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -# If app_url_domain doesn't exist, create it -if [ -z "$app_url_domain" ]; then - app_url_domain="https://$domain${path_url%/}" - ynh_app_setting_set --app=$app --key=app_url_domain --value=$app_url_domain -fi - # Cleaning legacy permissions if ynh_legacy_permissions_exists; then ynh_legacy_permissions_delete_all