coturn - configurale function called when external ip is updated
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sc_turnDomain="mydomain.com"
|
||||
|
||||
# sf_ipUpdate <NEW IP>
|
||||
# Called when a new external IP is detected
|
||||
sf_ipUpdate() { :; }
|
||||
|
@@ -78,6 +78,7 @@ step_10() {
|
||||
local confIp=`cat "$toolConf" | grep "^external-ip" | cut -d'=' -f2`
|
||||
|
||||
if [ "$pubIp" != "$confIp" ]; then
|
||||
exe sf_updateIp "${pubIp}"
|
||||
info "Update required (via $ipUpdater). New public ip: $pubIp"
|
||||
exe sed -i "s/^external-ip[[:space:]]*=.*/external-ip=${pubIp}/" "$toolConf"
|
||||
exe sleep 1
|
||||
|
Reference in New Issue
Block a user