From 4fbf2ca1dcb1da018a22ba780821002e8bb4d7ad Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 1 Mar 2021 20:42:12 +0100 Subject: [PATCH] fix --- scripts/install | 4 ++-- scripts/restore | 4 ++-- scripts/upgrade | 6 ++---- sources/Coturn_config_rotate.sh | 4 ++-- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/scripts/install b/scripts/install index 9873b14..b06fb65 100755 --- a/scripts/install +++ b/scripts/install @@ -249,8 +249,8 @@ setfacl -R -m user:turnserver:rwX /var/log/$app #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 -yunohost service add $app --description="Videoconferencing server" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port" -yunohost service add coturn-$app --description="Coturn TURN server" --log="/var/log/$app/turnserver.log" --needs_exposed_ports="$turnserver_port" +yunohost service add $app --description="Videoconferencing server" --log="/var/log/$app/$app.log" --needs_exposed_ports $port +yunohost service add coturn-$app --description="Coturn TURN server" --log="/var/log/$app/turnserver.log" --needs_exposed_ports $turnserver_port #================================================= # START SYSTEMD SERVICE diff --git a/scripts/restore b/scripts/restore index 8b7e888..a4c0dd8 100755 --- a/scripts/restore +++ b/scripts/restore @@ -96,8 +96,8 @@ systemctl enable coturn-$app.service --quiet #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 -yunohost service add $app --description="Videoconferencing server" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port" -yunohost service add coturn-$app --description="Coturn TURN server" --log="/var/log/$app/turnserver.log" --needs_exposed_ports="$turnserver_port" +yunohost service add $app --description="Videoconferencing server" --log="/var/log/$app/$app.log" --needs_exposed_ports $port +yunohost service add coturn-$app --description="Coturn TURN server" --log="/var/log/$app/turnserver.log" --needs_exposed_ports $turnserver_port #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index baaa7da..b4e3148 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -135,9 +135,7 @@ then # Set a port for each service in turnserver turnserver_port=$(ynh_find_port --port=1194) - ynh_app_setting_set --app=$app --key=turnserver_port --value=$turnserver_port - ynh_exec_warn_less yunohost firewall allow Both $turnserver_port #================================================= @@ -263,8 +261,8 @@ ynh_use_logrotate --non-append #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=2 -yunohost service add $app --description="Videoconferencing server" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port" -yunohost service add coturn-$app --description="Coturn TURN server" --log="/var/log/$app/turnserver.log" --needs_exposed_ports="$turnserver_port" +yunohost service add $app --description="Videoconferencing server" --log="/var/log/$app/$app.log" --needs_exposed_ports $port +yunohost service add coturn-$app --description="Coturn TURN server" --log="/var/log/$app/turnserver.log" --needs_exposed_ports $turnserver_port #================================================= # START SYSTEMD SERVICE diff --git a/sources/Coturn_config_rotate.sh b/sources/Coturn_config_rotate.sh index da3fcbe..f03112d 100644 --- a/sources/Coturn_config_rotate.sh +++ b/sources/Coturn_config_rotate.sh @@ -4,8 +4,8 @@ source /usr/share/yunohost/helpers external_IP_line="external-ip=__IPV4__/__IPV6__" -public_ip4="$(curl ip.yunohost.org)" || true -public_ip6="$(curl ipv6.yunohost.org)" || true +public_ip4="$(curl -s ip.yunohost.org)" || true +public_ip6="$(curl -s ipv6.yunohost.org)" || true if [ -n "$public_ip4" ] && ynh_validate_ip4 --ip_address="$public_ip4" then