Compare commits

..

No commits in common. "c0678f0501dfccc56b692a64439b4bd1982149a1" and "daeb173dbcee7384a6dfa9fc45a1c1da1df3ba1a" have entirely different histories.

7 changed files with 6 additions and 14 deletions

View file

@ -41,7 +41,7 @@ Run the complete base installation:
:foreach Script in={ "global-config"; "global-config-overlay"; "global-functions" } do={ :foreach Script in={ "global-config"; "global-config-overlay"; "global-functions" } do={
:put "Installing $Script..."; :put "Installing $Script...";
/system/script/remove [ find where name=$Script ]; /system/script/remove [ find where name=$Script ];
/system/script/add name=$Script owner=$Script source=([ /tool/fetch check-certificate=yes-without-crl ($BaseUrl . $Script . ".rsc") output=user as-value ]->"data"); /system/script/add name=$Script owner=$Script source=([ /tool/fetch check-certificate=yes-without-crl ($BaseUrl . $Script . ".rsc") output=user as-value]->"data");
}; };
:put "Loading configuration and functions..."; :put "Loading configuration and functions...";
/system/script { run global-config; run global-functions; }; /system/script { run global-config; run global-functions; };

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Before After
Before After

View file

@ -128,7 +128,7 @@ date and time is set correctly!
Now let's download the main scripts and add them in configuration on the fly. Now let's download the main scripts and add them in configuration on the fly.
:foreach Script in={ "global-config"; "global-config-overlay"; "global-functions" } do={ /system/script/add name=$Script owner=$Script source=([ /tool/fetch check-certificate=yes-without-crl ("https://rsc.eworm.de/main/" . $Script . ".rsc") output=user as-value ]->"data"); }; :foreach Script in={ "global-config"; "global-config-overlay"; "global-functions" } do={ /system/script/add name=$Script owner=$Script source=([ /tool/fetch check-certificate=yes-without-crl ("https://rsc.eworm.de/main/" . $Script . ".rsc") output=user as-value]->"data"); };
![screenshot: import scripts](README.d/04-import-scripts.avif) ![screenshot: import scripts](README.d/04-import-scripts.avif)

View file

@ -42,7 +42,7 @@
$LogPrint warning $ScriptName ("Your license expired on " . ($License->"deadline-at") . "!"); $LogPrint warning $ScriptName ("Your license expired on " . ($License->"deadline-at") . "!");
:if ($SentCertificateNotification != "expired") do={ :if ($SentCertificateNotification != "expired") do={
$SendNotification2 ({ origin=$ScriptName; \ $SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "scroll,warning-sign" ] . "License expired!"); \ subject=([ $SymbolForNotification "warning-sign" ] . "License expired!"); \
message=("Your license expired on " . ($License->"deadline-at") . \ message=("Your license expired on " . ($License->"deadline-at") . \
", can no longer update RouterOS on " . $Identity . "...") }); ", can no longer update RouterOS on " . $Identity . "...") });
:set SentCertificateNotification "expired"; :set SentCertificateNotification "expired";
@ -55,7 +55,7 @@
$LogPrint warning $ScriptName ("Your license will expire on " . ($License->"deadline-at") . "!"); $LogPrint warning $ScriptName ("Your license will expire on " . ($License->"deadline-at") . "!");
:if ($SentCertificateNotification != "warning") do={ :if ($SentCertificateNotification != "warning") do={
$SendNotification2 ({ origin=$ScriptName; \ $SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "scroll,warning-sign" ] . "License about to expire!"); \ subject=([ $SymbolForNotification "warning-sign" ] . "License about to expire!"); \
message=("Your license failed to renew and is about to expire on " . \ message=("Your license failed to renew and is about to expire on " . \
($License->"deadline-at") . " on " . $Identity . "...") }); ($License->"deadline-at") . " on " . $Identity . "...") });
:set SentCertificateNotification "warning"; :set SentCertificateNotification "warning";
@ -68,7 +68,7 @@
[ :totime ($License->"deadline-at") ] - 4w > [ :timestamp ]) do={ [ :totime ($License->"deadline-at") ] - 4w > [ :timestamp ]) do={
$LogPrint info $ScriptName ("Your license was successfully renewed."); $LogPrint info $ScriptName ("Your license was successfully renewed.");
$SendNotification2 ({ origin=$ScriptName; \ $SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "scroll,white-heavy-check-mark" ] . "License renewed"); \ subject=([ $SymbolForNotification "white-heavy-check-mark" ] . "License renewed"); \
message=("Your license was successfully renewed on " . $Identity . \ message=("Your license was successfully renewed on " . $Identity . \
". It is now valid until " . ($License->"deadline-at") . ".") }); ". It is now valid until " . ($License->"deadline-at") . ".") });
:set SentCertificateNotification; :set SentCertificateNotification;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Before After
Before After

View file

@ -1672,7 +1672,6 @@
:set SymbolByUnicodeName do={ :set SymbolByUnicodeName do={
:local Name [ :tostr $1 ]; :local Name [ :tostr $1 ];
:global EitherOr;
:global LogPrintOnce; :global LogPrintOnce;
:global SymbolsExtra; :global SymbolsExtra;
@ -1704,7 +1703,6 @@
"mobile-phone"="\F0\9F\93\B1"; "mobile-phone"="\F0\9F\93\B1";
"pushpin"="\F0\9F\93\8C"; "pushpin"="\F0\9F\93\8C";
"scissors"="\E2\9C\82"; "scissors"="\E2\9C\82";
"scroll"="\F0\9F\93\9C";
"smiley-partying-face"="\F0\9F\A5\B3"; "smiley-partying-face"="\F0\9F\A5\B3";
"smiley-smiling-face"="\E2\98\BA"; "smiley-smiling-face"="\E2\98\BA";
"smiley-winking-face-with-tongue"="\F0\9F\98\9C"; "smiley-winking-face-with-tongue"="\F0\9F\98\9C";
@ -1715,18 +1713,12 @@
"white-heavy-check-mark"="\E2\9C\85" "white-heavy-check-mark"="\E2\9C\85"
}, $SymbolsExtra); }, $SymbolsExtra);
:local Magic [ :pick [ /system/clock/get date ] 4 10 ];
:local Special {
"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" };
:if ([ :len ($Symbols->$Name) ] = 0) do={ :if ([ :len ($Symbols->$Name) ] = 0) do={
$LogPrintOnce warning $0 ("No symbol available for name '" . $Name . "'!"); $LogPrintOnce warning $0 ("No symbol available for name '" . $Name . "'!");
:return ""; :return "";
} }
:return ([ $EitherOr ($Special->($Name . $Magic)) ($Symbols->$Name) ] . "\EF\B8\8F"); :return (($Symbols->$Name) . "\EF\B8\8F");
} }
# return symbol for notification # return symbol for notification