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:
parent
8533a8254d
commit
eeee06ee3b
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue