From fe0d4ca75110c8ba7f16091049ab071bc0930c5b Mon Sep 17 00:00:00 2001 From: Martin Winkler Date: Thu, 2 Mar 2023 14:08:20 +0100 Subject: [PATCH] coturn - Fix update function name and output nothing if no update is needed --- seqs/coturn.cfg.example | 2 +- seqs/coturn.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/seqs/coturn.cfg.example b/seqs/coturn.cfg.example index 813ad36..f477098 100644 --- a/seqs/coturn.cfg.example +++ b/seqs/coturn.cfg.example @@ -4,4 +4,4 @@ sc_turnDomain="mydomain.com" # sf_ipUpdate # Called when a new external IP is detected -sf_ipUpdate() { :; } +sf_updateIp() { :; } diff --git a/seqs/coturn.sh b/seqs/coturn.sh index 2e51652..977d307 100755 --- a/seqs/coturn.sh +++ b/seqs/coturn.sh @@ -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