From 1cba702a4b071a1c6dad177638ac324645b07d85 Mon Sep 17 00:00:00 2001 From: selfhoster1312 Date: Fri, 21 Jun 2024 11:49:26 +0200 Subject: [PATCH] Fix port calculation logic --- scripts/install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 323915a..9cb6105 100644 --- a/scripts/install +++ b/scripts/install @@ -106,12 +106,12 @@ ynh_use_logrotate ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 ports_args=() -if [[ "${opened_ports:-__NOTHING__}" = "__NOTHING__" ]]; then - ports_args+=('--open-ports') - ports_args+=(${ports}) +if [[ "${opened_ports:-__NOTHING__}" != "__NOTHING__" ]]; then + ports_args+=('--needs_exposed_ports') + ports_args+=(${opened_ports}) fi -yunohost service add "$app" --description="Jellyfin media center" "${ports_args[@]}" +yunohost service add "$app" --description="Jellyfin media center" ${ports_args[@]} #================================================= # EDIT SYSTEMD ENVIRONMENT VARIABLE FOR AUTO-DISCOVERY