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

Don't restart coturn if ip config didn't change

This commit is contained in:
Josué Tille 2020-05-07 11:06:35 +02:00
parent 8533a8254d
commit eeee06ee3b
No known key found for this signature in database
GPG key ID: 716A6C99B04194EF

View file

@ -23,10 +23,15 @@ else
external_IP_line="${external_IP_line/',__IPV6__'/}"
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")
setfacl -R -m user:turnserver:rX /etc/matrix-$app_instance
systemctl restart coturn-$app_instance.service
if [ "$old_config_line" != "$new_config_line" ]
then
systemctl restart coturn-$app_instance.service
fi
exit 0