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__
|
2024-03-21 23:34:04 +01:00
|
|
|
YNH_APP_BASEDIR=/etc/yunohost/apps/"$app"
|
2018-06-20 19:16:01 +02:00
|
|
|
|
2024-02-20 23:49:31 +01:00
|
|
|
pushd /etc/yunohost/apps/$app/conf
|
2024-03-12 20:30:35 +01:00
|
|
|
|
2018-07-06 09:25:47 +02:00
|
|
|
source /usr/share/yunohost/helpers
|
2018-06-20 19:16:01 +02:00
|
|
|
|
2024-03-12 20:30:35 +01:00
|
|
|
# Must load db_name var to load _common.sh
|
2024-03-11 23:45:21 +01:00
|
|
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
2024-03-12 20:30:35 +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-03-21 23:34:04 +01:00
|
|
|
enable_dtls_for_audio_video_turn_call=$(ynh_app_setting_get --app=$app --key=enable_dtls_for_audio_video_turn_call)
|
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
|