From: vados-dev <192440777+vados-dev@users.noreply.github.com> Date: Mon, 4 May 2026 21:35:03 +0000 (+0300) Subject: Autocommit in repo: ros.vados.ru, generated by owner: root, in 00:35:02 05.05.2026. X-Git-Url: https://git.vados.ru/gitweb.cgi?a=commitdiff_plain;h=a9497a839647bc9a7b202474f3bded8b904fb820;p=Mikrotiks%2Fros.vados.ru.git Autocommit in repo: ros.vados.ru, generated by owner: root, in 00:35:02 05.05.2026. --- diff --git a/html/AM-GlobalFunc.rsc b/html/AM-GlobalFunc.rsc index abacf5ecb..1b743a653 100644 --- a/html/AM-GlobalFunc.rsc +++ b/html/AM-GlobalFunc.rsc @@ -17,9 +17,9 @@ :global GlobalFuncReady false; # Git commit id & info, expected configuration version -:global CommitId "main/610/618e021b"; +:global CommitId "main/611/a8abd15c"; :global CommitTAG "unknown"; -:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 00:30:03 05.05.2026."; +:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 00:35:02 05.05.2026."; # The variables are received right here. :global GlobalConfVersion 140; diff --git a/html/AM-RKN-dnsLookup.rsc b/html/AM-RKN-dnsLookup.rsc index 02e4482a6..27bb18688 100644 --- a/html/AM-RKN-dnsLookup.rsc +++ b/html/AM-RKN-dnsLookup.rsc @@ -38,48 +38,38 @@ while (!$dnsLookupReady) do={ :nothing; } :local ListRKN "FuckRKN"; :local ListComment ("ListRKN managed by " . $ScriptName); - :foreach aListItem in=[/ip/firewall/address-list find list=$ListRKN] do={ /ip firewall address-list remove $aListItem; } - :foreach aItem in=$arrRKN do={ -#force the dns entries to be cached :do { :resolve $aItem; } on-error={ - :log error "dns resolve failure [ ip - resolve ip ]" + :log error "dns resolve failure [ ip - resolve ip ]"; } - :foreach dnsRecord in=[/ip dns cache all find where (name=$aItem)] do={ -#if it's an A records add it directly :if ([/ip dns cache all get $dnsRecord type]="A") do={ :local newAddress [/ip dns cache all get $dnsRecord data]; :do { /ip firewall address-list add list=$ListRKN address=$newAddress comment=$aItem; } on-error={ - :log error "error when adding ip to list: $newAddress" + :log error "error when adding ip to list: $newAddress"; } } - -#if it's a CNAME follow it until we get A records :if ([/ip dns cache all get $dnsRecord type]="CNAME") do={ :local cname; - :local nextCname + :local nextCname; :set cname [/ip dns cache all find where (name=$aItem && type="CNAME")]; :set nextCname [/ip dns cache all find where (name=[/ip dns cache all get $cname data] && type="CNAME")]; - :while ($nextCname != "") do={ :set cname $nextCname; :set nextCname [/ip dns cache all find where (name=[/ip dns cache all get $cname data] && type="CNAME")]; } - -#add the a records we found :foreach aRecord in=[/ip dns cache all find where (name=[/ip dns cache all get $cname data] && type="A")] do={ :do { /ip firewall address-list add list=$ListRKN address=[/ip dns cache all get $aRecord data] comment=$aItem; } on-error={ - :log error "error when adding ip to list: $newAddress" + :log error "error when adding ip to list: $newAddress"; } } } @@ -88,6 +78,6 @@ while (!$dnsLookupReady) do={ :nothing; } :if ([ :len [ /system/scheduler/find where name=$ScriptName ] ] = 0) do={ :log error ($ScriptName . "System Scheduler for script: " . $ScriptName . " is NOT SET! Fix It Now!"); - /system/scheduler/add name=$ScriptName on-event="/system/script { run $ScriptName; }" comment="Update RKN DNS Looup" interval=20m policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon; start-time=[/system/clock/get date]; + /system/scheduler/add name=$ScriptName on-event="/system/script { run $ScriptName; }" comment="Update RKN DNS Looup" interval=00:20:00 policy="ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon" start-time=startup; } :set dnsLookupReady true;