:global GlobalFuncReady false;
# Git commit id & info, expected configuration version
-:global CommitId "main/293/c17fc8f9";
+:global CommitId "main/298/26df33a0";
:global CommitTAG "unknown";
-:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 16:15:02 30.04.2026.";
+:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 19:10:02 30.04.2026.";
# The variables are received right here.
:global GlobalConfVersion 138;
:set GetPubIp do={
:global DetectIpAddrDefault;
:global DetectIpAddrFallback;
- :global LogPrint;
-
+
:local PubIpAddr false;
:local Url $DetectIpAddrDefault;
-# :retry command={abc} delay=1 max=2 on-error={:put "got error"}
:do {
- $LogPrint 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={$LogPrint error [ :jobname ] ("Failed to detect public IP using default service: " . $Url . ".")}
- #:error "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={
- $LogPrint 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;
- $LogPrint 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={$LogPrint 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];
}
- :put [ $PubIpAddr ];
-# :return $PubIpAddr;
+ :local Return [:put [ $PubIpAddr ]];
+ :return $Return;
}
:set FormatLine do={