mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-03-06 05:59:36 +00:00
Compare commits
5 commits
c0678f0501
...
96896c37e5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
96896c37e5 | ||
|
|
6e37bab481 | ||
|
|
28b00e23a1 | ||
|
|
830693df79 | ||
|
|
240decf419 |
4 changed files with 5 additions and 7 deletions
|
|
@ -42,7 +42,7 @@
|
|||
$LogPrint warning $ScriptName ("Your license expired on " . ($License->"deadline-at") . "!");
|
||||
:if ($SentCertificateNotification != "expired") do={
|
||||
$SendNotification2 ({ origin=$ScriptName; \
|
||||
subject=([ $SymbolForNotification "scroll,warning-sign" ] . "License expired!"); \
|
||||
subject=([ $SymbolForNotification "scroll,cross-mark" ] . "License expired!"); \
|
||||
message=("Your license expired on " . ($License->"deadline-at") . \
|
||||
", can no longer update RouterOS on " . $Identity . "...") });
|
||||
:set SentCertificateNotification "expired";
|
||||
|
|
|
|||
|
|
@ -39,14 +39,11 @@
|
|||
:local DoUpdate do={
|
||||
:local ScriptName [ :tostr $1 ];
|
||||
|
||||
:global LogPrint;
|
||||
|
||||
:if ([ :len [ /system/script/find where name="packages-update" ] ] > 0) do={
|
||||
/system/script/run packages-update;
|
||||
} else={
|
||||
/system/package/update/install without-paging;
|
||||
}
|
||||
$LogPrint info $ScriptName ("Waiting for system to reboot.");
|
||||
}
|
||||
|
||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||
|
|
|
|||
|
|
@ -1717,6 +1717,7 @@
|
|||
|
||||
:local Magic [ :pick [ /system/clock/get date ] 4 10 ];
|
||||
:local Special {
|
||||
"information-04-01"="\F0\9F\9A\BB";
|
||||
"large-orange-circle-04-01"="\F0\9F\8D\8A";
|
||||
"large-orange-circle-10-31"="\F0\9F\8E\83";
|
||||
"large-red-circle-04-01"="\F0\9F\8D\92" };
|
||||
|
|
|
|||
|
|
@ -94,8 +94,8 @@
|
|||
:set ($HostInfo->"doh-url") ("https://" . [ $EitherOr $HostName ($HostVal->"host") ] . "/dns-query");
|
||||
}
|
||||
|
||||
:if ($DohCurrent = $HostInfo->"doh-url") do={
|
||||
$LogPrint debug $ScriptName ("Current DoH server is still up: " . $DohCurrent);
|
||||
:if ($DohCurrent = $HostInfo->"doh-url" && [ $IsDNSResolving ] = true) do={
|
||||
$LogPrint debug $ScriptName ("Current DoH server is still up and resolving: " . $DohCurrent);
|
||||
:set ExitOK true;
|
||||
:error true;
|
||||
}
|
||||
|
|
@ -105,7 +105,7 @@
|
|||
}
|
||||
|
||||
:if ([ :len $DohCurrent ] > 0) do={
|
||||
$LogPrint info $ScriptName ("Current DoH server is down, disabling: " . $DohCurrent);
|
||||
$LogPrint info $ScriptName ("Current DoH server is down or not resolving, disabling: " . $DohCurrent);
|
||||
/ip/dns/set use-doh-server="";
|
||||
/ip/dns/cache/flush;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue