From b317d0414de1d2092359af680e04e6d6194fb977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 17 Jan 2021 13:33:23 +0100 Subject: [PATCH] Testing (#15) * Fix links --- manifest.json | 2 +- scripts/install | 1 - scripts/remove | 1 + scripts/upgrade | 1 - sources/Coturn_config_rotate.sh | 11 +++++------ 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/manifest.json b/manifest.json index 3deffad..274c525 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Videoconferencing server that is easy to deploy", "fr": "Serveur de visioconférence facile à déployer" }, - "version": "0.2~ynh3", + "version": "0.2~ynh4", "url": "https://galene.org/", "license": "MIT", "maintainer": { diff --git a/scripts/install b/scripts/install index aebe99f..087a546 100755 --- a/scripts/install +++ b/scripts/install @@ -244,7 +244,6 @@ ynh_use_logrotate --logfile "/var/log/$app" # For any update do it in all files cp ../sources/Coturn_config_rotate.sh $final_path/Coturn_config_rotate.sh -ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/Coturn_config_rotate.sh" #================================================= # GENERIC FINALIZATION diff --git a/scripts/remove b/scripts/remove index 66f2e7e..c319986 100755 --- a/scripts/remove +++ b/scripts/remove @@ -109,6 +109,7 @@ ynh_script_progression --message="Removing the dedicated system user..." --weigh # Delete a system user ynh_system_user_delete --username=$app +deluser turnserver ssl-cert #================================================= # END OF SCRIPT diff --git a/scripts/upgrade b/scripts/upgrade index 804b773..ab21e12 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -201,7 +201,6 @@ ynh_store_file_checksum --file="$coturn_config_path" # For any update do it in all files cp ../sources/Coturn_config_rotate.sh $final_path/Coturn_config_rotate.sh -ynh_replace_string --match_string=__APP__ --replace_string=$app --target_file="$final_path/Coturn_config_rotate.sh" #================================================= # MODIFY A CONFIG FILE diff --git a/sources/Coturn_config_rotate.sh b/sources/Coturn_config_rotate.sh index 7c2d704..1982f3c 100644 --- a/sources/Coturn_config_rotate.sh +++ b/sources/Coturn_config_rotate.sh @@ -1,6 +1,5 @@ #!/bin/bash -app_instance=__APP__ source /usr/share/yunohost/helpers @@ -19,15 +18,15 @@ then echo "external-ip=$public_ip6" >> "$coturn_config_path" fi -old_config_line=$(egrep "^external-ip=.*\$" "/etc/matrix-$app_instance/coturn.conf") -ynh_replace_string "^external-ip=.*\$" "$external_IP_line" "/etc/matrix-$app_instance/coturn.conf" -new_config_line=$(egrep "^external-ip=.*\$" "/etc/matrix-$app_instance/coturn.conf") +old_config_line=$(egrep "^external-ip=.*\$" "/etc/$app/coturn.conf") +ynh_replace_string "^external-ip=.*\$" "$external_IP_line" "/etc/$app/coturn.conf" +new_config_line=$(egrep "^external-ip=.*\$" "/etc/$app/coturn.conf") -setfacl -R -m user:turnserver:rX /etc/matrix-$app_instance +setfacl -R -m user:turnserver:rX /etc/$app if [ "$old_config_line" != "$new_config_line" ] then - systemctl restart coturn-$app_instance.service + systemctl restart coturn-$app.service fi exit 0