diff --git a/check_process b/check_process index 6a85be0..d97cd59 100644 --- a/check_process +++ b/check_process @@ -15,7 +15,7 @@ multi_instance=1 incorrect_path=1 port_already_use=1 - change_url=0 + change_url=1 ;;; Levels Level 1=auto Level 2=auto diff --git a/scripts/change_url b/scripts/change_url index 93a67da..7f39e9c 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -92,8 +92,14 @@ fi #================================================= # SPECIFIC MODIFICATIONS #================================================= -# ... +# MODIFY URL IN .ENV #================================================= +ynh_print_info "Updating .env configuration..." + +ynh_replace_string "__NODEJS_PATH__" "$nodejs_path" "$final_path/.env" +ynh_replace_string "__DB_NAME__" "$db_name" "$final_path/.env" +ynh_replace_string "__DOMAIN_URI__" "$new_domain$new_path" "$final_path/.env" +ynh_replace_string "__PORT__" "$port" "$final_path/.env" #================================================= # GENERIC FINALISATION