From b58aeba334d7ce21ce9fd8117de9def7855a28eb Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 22 Dec 2021 12:26:20 +0100 Subject: [PATCH] Update upgrade --- scripts/upgrade | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 6c95f36..a0e7c76 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -61,6 +61,12 @@ if [ -z "$final_path" ]; then ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi +# If final_path doesn't exist, create it +if [ -z "$port" ]; then + port=$(ynh_find_port --port=6000) + ynh_app_setting_set --app=$app --key=port --value=$port +fi + # If new datadir doesn't exist, create it if [ -z "/home/yunohost.app/$app" ]; then datadir=/home/yunohost.app/$app