2018-06-20 19:16:01 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-02-20 21:39:06 +01:00
|
|
|
set -eu
|
|
|
|
|
2024-02-20 23:49:31 +01:00
|
|
|
app=__APP__
|
2018-06-20 19:16:01 +02:00
|
|
|
|
2024-02-20 23:49:31 +01:00
|
|
|
pushd /etc/yunohost/apps/$app/conf
|
2018-07-06 09:25:47 +02:00
|
|
|
source /usr/share/yunohost/helpers
|
2024-02-20 23:49:31 +01:00
|
|
|
source ../scripts/_common.sh
|
2018-06-20 19:16:01 +02:00
|
|
|
|
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)
|
2018-06-20 19:16:01 +02:00
|
|
|
|
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
|
2018-08-20 14:12:42 +02:00
|
|
|
|
2024-02-20 23:49:31 +01:00
|
|
|
if [ "$previous_checksum" != "$new_checksum" ]
|
2020-05-07 11:06:35 +02:00
|
|
|
then
|
2024-02-20 23:49:31 +01:00
|
|
|
systemctl restart $app-coturn.service
|
2020-05-07 11:06:35 +02:00
|
|
|
fi
|
2018-08-20 12:46:38 +02:00
|
|
|
|
|
|
|
exit 0
|