From 515890533c5fa05435a1254315b6fae56cc430ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 30 Aug 2022 06:50:02 +0200 Subject: [PATCH] Fix missing port --- scripts/upgrade | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 09c4e39..fa25c9c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -49,6 +49,12 @@ if [ -z "$final_path" ]; then ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi +if [ -z "${port:-}" ]; then + # Find available ports + port=$(ynh_find_port --port 6000) + ynh_app_setting_set --app $app --key web_port --value $port +fi + # If path_url doesn't exist, create it if [ -z "$path_url" ]; then path_url=$(ynh_app_setting_get --app=$app --key=path)