Problem with upgrade and missing "__PORT__" replace in nginx.conf

The upgrade for doesn’t work yet.

It ends with:

nginx: [emerg] invalid port in upstream “” in /etc/nginx/conf.d/

It seems that “PORT” is not replace by upgrade script…
It’s done by:

port=$(ynh_app_setting_get --app="$app" --key=port)
ynh_add_nginx_config "public_path" "port"

The install script does this:

port=$(ynh_find_port --port=8000)
ynh_app_setting_set --app="$app" --key=port --value="$port"
ynh_add_nginx_config "public_path" "port"

The install part works, but the upgrade part not.
It seems to me that ynh_app_setting_get --app="$app" --key=port returns None so that ynh_add_nginx_config doesn’t replace __PORT__

Any idea?

Do you have the port when you enter yunohost app setting yourapp port ?

Yes, the port is stored…

The Problem is away. Think i fixed it with