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