coturn - Fix update function name and output nothing if no update is needed
This commit is contained in:
@@ -4,4 +4,4 @@ sc_turnDomain="mydomain.com"
|
||||
|
||||
# sf_ipUpdate <NEW IP>
|
||||
# Called when a new external IP is detected
|
||||
sf_ipUpdate() { :; }
|
||||
sf_updateIp() { :; }
|
||||
|
@@ -51,6 +51,8 @@ step_10() {
|
||||
local lLevelSave=${LOG_LEVEL:?}
|
||||
local lTimeSave=${LOG_TIME:-}
|
||||
local retval=0
|
||||
local lSilent=0
|
||||
silent && lSilent=1
|
||||
|
||||
# Force a visible output level for this step
|
||||
if [ "${1:-}" == "-l" ]; then
|
||||
@@ -82,9 +84,8 @@ step_10() {
|
||||
info "Update required (via $ipUpdater). New public ip: $pubIp"
|
||||
exe sed -i "s/^external-ip[[:space:]]*=.*/external-ip=${pubIp}/" "$toolConf"
|
||||
exe sleep 1
|
||||
info "Restarting $toolName"
|
||||
exe /bin/systemctl restart $toolServiceName
|
||||
else
|
||||
elif (( ! lSilent )) ; then
|
||||
info "No update required for ${sc_turnDomain} (via $ipUpdater). Current ip: $confIp"
|
||||
fi
|
||||
fi
|
||||
|
Reference in New Issue
Block a user