1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/synapse_ynh.git synced 2024-09-03 20:26:38 +02:00
synapse_ynh/sources/Coturn_config_rotate.sh

29 lines
854 B
Bash
Raw Normal View History

#!/bin/bash
2024-02-20 21:39:06 +01:00
set -eu
2024-02-20 23:49:31 +01:00
app=__APP__
2024-02-20 23:49:31 +01:00
pushd /etc/yunohost/apps/$app/conf
source /usr/share/yunohost/helpers
2024-02-20 23:49:31 +01:00
source ../scripts/_common.sh
2024-02-20 23:49:31 +01:00
domain=$(ynh_app_setting_get --app=$app --key=domain)
port_cli=$(ynh_app_setting_get --app=$app --key=port_cli)
turnserver_pwd=$(ynh_app_setting_get --app=$app --key=turnserver_pwd)
port_turnserver_tls=$(ynh_app_setting_get --app=$app --key=port_turnserver_tls)
port_turnserver_alt_tls=$(ynh_app_setting_get --app=$app --key=port_turnserver_alt_tls)
2024-02-20 23:49:31 +01:00
previous_checksum=$(ynh_app_setting_get --app=$app --key=checksum__etc_matrix-synapse_coturn.conf)
configure_coturn
new_checksum=$(ynh_app_setting_get --app=$app --key=checksum__etc_matrix-synapse_coturn.conf)
2021-02-18 09:16:37 +01:00
2024-02-20 23:49:31 +01:00
setfacl -R -m user:turnserver:rX /etc/matrix-$app
2024-02-20 23:49:31 +01:00
if [ "$previous_checksum" != "$new_checksum" ]
then
2024-02-20 23:49:31 +01:00
systemctl restart $app-coturn.service
fi
exit 0