:global GlobalFuncReady false;
# Git commit id & info, expected configuration version
-:global CommitId "main/298/26df33a0";
+:global CommitId "main/293/c17fc8f9";
:global CommitTAG "unknown";
-:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 19:10:02 30.04.2026.";
+:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 16:15:02 30.04.2026.";
# The variables are received right here.
:global GlobalConfVersion 138;
:local PubIpAddr false;
:local Url $DetectIpAddrDefault;
+ :local JobName [ :jobname ];
:do {
- :log debug $0 ("Trying to detect public IP using default service: " . $Url . "...");
+ :log debug ($0 . " Trying to detect public IP using default service: " . $Url . "...");
:retry command={:set PubIpAddr ([ /tool/fetch http-method="get" check-certificate=yes-without-crl $Url output=user as-value ]->"data")} \
- delay=50ms max=5 on-error={:log error [ :jobname ] ("Failed to detect public IP using default service: " . $Url . ".")}
+ delay=50ms max=5 on-error={:log error ($JobName . " Failed to detect public IP using default service: " . $Url . ".")}
} on-error={
- :log error $0 ("Failed to detect public IP using default service: " . $Url . ".");
+ :log error ($0 . " Failed to detect public IP using default service: " . $Url . ".");
:set Url $DetectIpAddrFallBack;
- :log debug $0 ("Trying to detect public IP using fallback service: " . $Url . "...");
+ :log debug ($0 . " Trying to detect public IP using fallback service: " . $Url . "...");
:retry command={:set PubIpAddr ([ /tool/fetch http-method="get" check-certificate=yes-without-crl $Url output=user as-value ]->"data")} \
- delay=200ms max=5 on-error={:log error [ :jobname ] ("Failed to detect public IP using fallback service: " . $Url . ".")}
+ delay=200ms max=5 on-error={:log error ($JobName . " Failed to detect public IP using fallback service: " . $Url . ".")}
};
- :if ($PubIpAddr = false) do={
- :set PubIpAddr "not-detected";
- } else={
- :set PubIpAddr [ :pick $PubIpAddr 0 15];
- }
+ :if ($PubIpAddr = false) do={:set PubIpAddr "not-detected"} else={:set PubIpAddr [ :pick $PubIpAddr 0 15]}
:local Return [:put [ $PubIpAddr ]];
:return $Return;
}