From d0924453a63fbc215d47fd37982a39ee4d4f9b66 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sun, 23 May 2021 15:27:37 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20discovery=20arg=20tests=C2=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ynh_port_available helper returns 0 if port is available. What. --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 991a865..9c7182d 100644 --- a/scripts/install +++ b/scripts/install @@ -76,7 +76,7 @@ if [ $discovery -eq 1 ]; then ynh_script_progression --message="Configuring firewall..." --time --weight=1 # Open port 1900 for service auto-discovery - if [[ $(ynh_port_available --port=1900) -eq 1 ]]; then + if [[ $(ynh_port_available --port=1900) -eq 0 ]]; then ynh_exec_warn_less yunohost firewall allow UDP 1900 ynh_app_setting_set --app=$app --key=discovery_service --value=1 else @@ -85,7 +85,7 @@ if [ $discovery -eq 1 ]; then fi # Open port 7359 for client auto-discovery - if [[ $(ynh_port_available --port=7359) -eq 1 ]]; then + if [[ $(ynh_port_available --port=7359) -eq 0 ]]; then ynh_exec_warn_less yunohost firewall allow UDP 7359 ynh_app_setting_set --app=$app --key=discovery_client --value=1 else