]> Git [git.vados.ru] :: Repos - Mikrotiks/ros.vados.ru.git/commitdiff
Auto-commit: AM-GlobalFunc.rsc manual update on 4/30/2026, 2026-04-30T16:10:36.402Z
authorvados-dev <192440777+vados-dev@users.noreply.github.com>
Thu, 30 Apr 2026 16:10:36 +0000 (19:10 +0300)
committervados-dev <192440777+vados-dev@users.noreply.github.com>
Thu, 30 Apr 2026 16:10:36 +0000 (19:10 +0300)
html/AM-GlobalFunc.rsc

index 63a949d3b0e150ad9e3150a83d28d5158882b947..96c4ab63417f6344ee7b5ae950a74daaf082f976 100644 (file)
@@ -17,9 +17,9 @@
 :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;
 }