diff options
author | Christian Hesse <mail@eworm.de> | 2020-04-03 17:18:05 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2020-04-03 17:18:05 +0200 |
commit | d2b1f036ca79cfc8da0b27ff7037418bb5862d08 (patch) | |
tree | b0ec77b03ffc29982949dd689615ebf96bfa8908 /update-gre-address | |
parent | 004569045997f8a425137d0205790c94707b8930 (diff) |
update-gre-address: use $LogPrintExit
Diffstat (limited to 'update-gre-address')
-rw-r--r-- | update-gre-address | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/update-gre-address b/update-gre-address index 8ede500..c0c7e31 100644 --- a/update-gre-address +++ b/update-gre-address @@ -6,6 +6,8 @@ # ipsec remote peer # https://git.eworm.de/cgit/routeros-scripts/about/doc/update-gre-address.md +:global LogPrintExit; + / interface gre set remote-address=0.0.0.0 disabled=yes [ find where !running !disabled ]; :foreach Peer in=[ / ip ipsec active-peers find ] do={ @@ -16,7 +18,7 @@ :if ([ :typeof ($PeerVal->"dynamic-address") ] = "str" && \ ($PeerVal->"dynamic-address" != $GreIntVal->"remote-address" || \ $GreIntVal->"disabled" = true)) do={ - :log info ("Updating remote address for interface " . $GreIntVal->"name" . " to " . $PeerVal->"dynamic-address"); + $LogPrintExit info ("Updating remote address for interface " . $GreIntVal->"name" . " to " . $PeerVal->"dynamic-address") false; / interface gre set remote-address=0.0.0.0 disabled=yes [ find where remote-address=$PeerVal->"dynamic-address" name!=$GreIntVal->"name" ]; / interface gre set $GreInt remote-address=($PeerVal->"dynamic-address") disabled=no; } |