diff --git a/README.md b/README.md index d82a4c74..0bcd7083 100644 --- a/README.md +++ b/README.md @@ -230,7 +230,7 @@ everything is up-to-date it will not produce any output. If the update includes news or requires configuration changes a notification is sent - in addition to terminal output and log messages. -![notification: news and changes](README.d/notification-news-and-changes.avif) +![news and changes notification](README.d/notification-news-and-changes.avif) Adding a script --------------- diff --git a/backup-email.rsc b/backup-email.rsc index 70b18c06..fcafff45 100644 --- a/backup-email.rsc +++ b/backup-email.rsc @@ -16,7 +16,6 @@ do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50; :local ScriptName [ :jobname ]; - :global BackupFileNameDate; :global BackupPassword; :global BackupRandomDelay; :global BackupSendBinary; @@ -74,9 +73,7 @@ # filename based on identity :local DirName ("tmpfs/" . $ScriptName); - :local Clock [ /system/clock/get ]; - :local FileName [ $CleanName ($Identity . "." . $Domain . [ $IfThenElse \ - ($BackupFileNameDate = true) ("-" . $Clock->"date" . "-" . $Clock->"time") "" ] ) ]; + :local FileName [ $CleanName ($Identity . "." . $Domain) ]; :local FilePath ($DirName . "/" . $FileName); :local BackupFile "none"; :local ExportFile "none"; diff --git a/backup-upload.rsc b/backup-upload.rsc index b89d123d..bded570c 100644 --- a/backup-upload.rsc +++ b/backup-upload.rsc @@ -17,7 +17,6 @@ do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50; :local ScriptName [ :jobname ]; - :global BackupFileNameDate; :global BackupPassword; :global BackupRandomDelay; :global BackupSendBinary; @@ -73,9 +72,7 @@ # filename based on identity :local DirName ("tmpfs/" . $ScriptName); - :local Clock [ /system/clock/get ]; - :local FileName [ $CleanName ($Identity . "." . $Domain . [ $IfThenElse \ - ($BackupFileNameDate = true) ("-" . $Clock->"date" . "-" . $Clock->"time") "" ] ) ]; + :local FileName [ $CleanName ($Identity . "." . $Domain) ]; :local FilePath ($DirName . "/" . $FileName); :local BackupFile "none"; :local ExportFile "none"; diff --git a/contrib/html.sh b/contrib/html.sh index 0fca66ee..adacbbb8 100755 --- a/contrib/html.sh +++ b/contrib/html.sh @@ -17,7 +17,6 @@ markdown -f toc,idanchor "${1}" | sed \ -e '//s|pre|pre class="code" onclick="CopyToClipboard(this)"|g' \ - -e '/[a-z]\+: .*/s|alt="\([a-z]\+\):|class="\1" alt="\1:|' \ -e '/The above link may be broken on code hosting sites/s|blockquote|blockquote style="display: none;"|' sed \ diff --git a/contrib/html.sh.d/foot.html b/contrib/html.sh.d/foot.html index f7c0b83b..9e28e115 100644 --- a/contrib/html.sh.d/foot.html +++ b/contrib/html.sh.d/foot.html @@ -1,4 +1,3 @@ -

RouterOS Scripts documentation generated on __DATE__ for __VERSION__
Copyright © 2013-2026 Christian Hesse <mail@eworm.de>

diff --git a/contrib/html.sh.d/head.html b/contrib/html.sh.d/head.html index 8621350c..656a63c0 100644 --- a/contrib/html.sh.d/head.html +++ b/contrib/html.sh.d/head.html @@ -6,7 +6,7 @@ - +
eworm on meadow QR code: rsc.eworm.de RouterOS Scripts
@@ -14,4 +14,3 @@

- diff --git a/contrib/logo-color.html b/contrib/logo-color.html index e369694f..c39a20b8 100644 --- a/contrib/logo-color.html +++ b/contrib/logo-color.html @@ -40,9 +40,9 @@ something that differentiates? Color it!

Then right-click, click "Take Screenshot" and finally select the logo and download it.

-

screenshot: browser 01

-

screenshot: browser 02

-

screenshot: browser 03

+

Screenshot Browser 01

+

Screenshot Browser 02

+

Screenshot Browser 03

(This example is with Mozilla Firefox ↗️. The workflow diff --git a/contrib/telegram.md b/contrib/telegram.md index 3e432ffe..192fd6cb 100644 --- a/contrib/telegram.md +++ b/contrib/telegram.md @@ -263,10 +263,6 @@ Notes /save next Another satisfied user. 😊 Next, please! -#### Notename - - /save notename The `notename` is just an example from my note listing. Use the literal name of the note you want to see! - #### Off-topic /save off-topic Please note this group is not about MikroTik RouterOS in general, but [RouterOS Scripts](https://rsc.eworm.de/). Your request is not about scripting at all, so please discuss somewhere else. See the [MikroTik RouterOS users (english)](https://t.me/RouterOS_users_english) group or official Mikrotik forums (https://forum.mikrotik.com/). diff --git a/doc/backup-cloud.md b/doc/backup-cloud.md index 05187652..dcbd0f75 100644 --- a/doc/backup-cloud.md +++ b/doc/backup-cloud.md @@ -26,7 +26,7 @@ This script uploads ### Sample notification -![notification: backup-cloud](backup-cloud.d/notification.avif) +![backup-cloud notification](backup-cloud.d/notification.avif) Requirements and installation ----------------------------- diff --git a/doc/backup-email.md b/doc/backup-email.md index e55a0d7b..cf334697 100644 --- a/doc/backup-email.md +++ b/doc/backup-email.md @@ -34,7 +34,6 @@ Configuration The configuration goes to `global-config-overlay`, these are the parameters: -* `BackupFileNameDate`: whether to add date & time in filenames * `BackupSendBinary`: whether to send binary backup * `BackupSendExport`: whether to send configuration export * `BackupSendGlobalConfig`: whether to send `global-config-overlay` diff --git a/doc/backup-upload.md b/doc/backup-upload.md index eb79671b..221cb721 100644 --- a/doc/backup-upload.md +++ b/doc/backup-upload.md @@ -26,7 +26,7 @@ configuration export (`/export terse show-sensitive`) to external server. ### Sample notification -![notification: backup-upload](backup-upload.d/notification.avif) +![backup-upload notification](backup-upload.d/notification.avif) Requirements and installation ----------------------------- @@ -40,7 +40,6 @@ Configuration The configuration goes to `global-config-overlay`, these are the parameters: -* `BackupFileNameDate`: whether to add date & time in filenames * `BackupSendBinary`: whether to send binary backup * `BackupSendExport`: whether to send configuration export * `BackupSendGlobalConfig`: whether to send `global-config-overlay` diff --git a/doc/check-certificates.md b/doc/check-certificates.md index c4df2ba1..c6db7c88 100644 --- a/doc/check-certificates.md +++ b/doc/check-certificates.md @@ -21,8 +21,8 @@ certificates that are still about to expire. ### Sample notifications -![notification: check-certificates warning](check-certificates.d/notification-01-warn.avif) -![notification: check-certificates renew](check-certificates.d/notification-02-renew.avif) +![check-certificates notification warning](check-certificates.d/notification-01-warn.avif) +![check-certificates notification renew](check-certificates.d/notification-02-renew.avif) Requirements and installation ----------------------------- diff --git a/doc/check-health.md b/doc/check-health.md index 8ec79f5e..d67a3dde 100644 --- a/doc/check-health.md +++ b/doc/check-health.md @@ -40,27 +40,27 @@ sensors available in hardware: #### CPU utilization -![notification: check-health cpu utilization high](check-health.d/notification-01-cpu-utilization-high.avif) -![notification: check-health cpu utilization ok](check-health.d/notification-02-cpu-utilization-ok.avif) +![check-health notification cpu utilization high](check-health.d/notification-01-cpu-utilization-high.avif) +![check-health notification cpu utilization ok](check-health.d/notification-02-cpu-utilization-ok.avif) #### RAM utilization (low available RAM) -![notification: check-health ram utilization high](check-health.d/notification-03-ram-utilization-high.avif) -![notification: check-health ram utilization ok](check-health.d/notification-04-ram-utilization-ok.avif) +![check-health notification ram utilization high](check-health.d/notification-03-ram-utilization-high.avif) +![check-health notification ram utilization ok](check-health.d/notification-04-ram-utilization-ok.avif) #### Voltage -![notification: check-health voltage](check-health.d/notification-05-voltage.avif) +![check-health notification voltage](check-health.d/notification-05-voltage.avif) #### Temperature -![notification: check-health temperature high](check-health.d/notification-06-temperature-high.avif) -![notification: check-health temperature ok](check-health.d/notification-07-temperature-ok.avif) +![check-health notification temperature high](check-health.d/notification-06-temperature-high.avif) +![check-health notification temperature ok](check-health.d/notification-07-temperature-ok.avif) #### PSU state -![notification: check-health state fail](check-health.d/notification-08-state-fail.avif) -![notification: check-health state ok](check-health.d/notification-09-state-ok.avif) +![check-health notification state fail](check-health.d/notification-08-state-fail.avif) +![check-health notification state ok](check-health.d/notification-09-state-ok.avif) Requirements and installation ----------------------------- diff --git a/doc/check-lte-firmware-upgrade.md b/doc/check-lte-firmware-upgrade.md index 0731b7a3..37ca4896 100644 --- a/doc/check-lte-firmware-upgrade.md +++ b/doc/check-lte-firmware-upgrade.md @@ -26,7 +26,7 @@ upgrades. Currently supported LTE hardware: ### Sample notification -![notification: check-lte-firmware-upgrade](check-lte-firmware-upgrade.d/notification.avif) +![check-lte-firmware-upgrade notification](check-lte-firmware-upgrade.d/notification.avif) Requirements and installation ----------------------------- diff --git a/doc/check-perpetual-license.md b/doc/check-perpetual-license.md index 155f56f6..de91eeb5 100644 --- a/doc/check-perpetual-license.md +++ b/doc/check-perpetual-license.md @@ -22,8 +22,8 @@ and sends a notification to warn before expiration. ### Sample notifications -![notification: check-perpetual-license warn](check-perpetual-license.d/notification-01-warn.avif) -![notification: check-perpetual-license renew](check-perpetual-license.d/notification-02-renew.avif) +![check-perpetual-license notification warn](check-perpetual-license.d/notification-01-warn.avif) +![check-perpetual-license notification renew](check-perpetual-license.d/notification-02-renew.avif) Requirements and installation ----------------------------- diff --git a/doc/check-routeros-update.md b/doc/check-routeros-update.md index 120c9b91..18ad444a 100644 --- a/doc/check-routeros-update.md +++ b/doc/check-routeros-update.md @@ -37,8 +37,8 @@ automatically is supported. ### Sample notifications -![notification: check-routeros-update found](check-routeros-update.d/notification-01-found.avif) -![notification: check-routeros-update neighbor](check-routeros-update.d/notification-02-neighbor.avif) +![check-routeros-update notification found](check-routeros-update.d/notification-01-found.avif) +![check-routeros-update notification neighbor](check-routeros-update.d/notification-02-neighbor.avif) Requirements and installation ----------------------------- @@ -88,7 +88,7 @@ Be notified when run from scheduler or run it manually: If an update is found you can install it right away. -![screenshot: terminal](check-routeros-update.d/terminal.avif) +![Terminal](check-routeros-update.d/terminal.avif) Installing script [packages-update](packages-update.md) gives extra options. diff --git a/doc/collect-wireless-mac.md b/doc/collect-wireless-mac.md index dbf24c02..96b314e1 100644 --- a/doc/collect-wireless-mac.md +++ b/doc/collect-wireless-mac.md @@ -24,7 +24,7 @@ and modify it to your needs. ### Sample notification -![notification: collect-wireless-mac](collect-wireless-mac.d/notification.avif) +![collect-wireless-mac notification](collect-wireless-mac.d/notification.avif) Requirements and installation ----------------------------- diff --git a/doc/daily-psk.md b/doc/daily-psk.md index de3b5092..7ddb4d98 100644 --- a/doc/daily-psk.md +++ b/doc/daily-psk.md @@ -21,7 +21,7 @@ passphrase to a pseudo-random string daily. ### Sample notification -![notification: daily-psk](daily-psk.d/notification.avif) +![daily-psk notification](daily-psk.d/notification.avif) Requirements and installation ----------------------------- diff --git a/doc/log-forward.md b/doc/log-forward.md index 8dc3e192..7bee120f 100644 --- a/doc/log-forward.md +++ b/doc/log-forward.md @@ -37,8 +37,8 @@ log messages and forwards them via notification. ### Sample notifications -![notification: log-forward info](log-forward.d/notification-01-info.avif) -![notification: log-forward warn](log-forward.d/notification-02-warn.avif) +![log-forward notification info](log-forward.d/notification-01-info.avif) +![log-forward notification warn](log-forward.d/notification-02-warn.avif) Requirements and installation ----------------------------- diff --git a/doc/mod/inspectvar.md b/doc/mod/inspectvar.md index 526f51e1..28032651 100644 --- a/doc/mod/inspectvar.md +++ b/doc/mod/inspectvar.md @@ -33,7 +33,7 @@ Call the function `$InspectVar` with a variable as parameter: $InspectVar $ModeButton; -![screenshot: InspectVar](inspectvar.d/01-inspectvar.avif) +![InspectVar](inspectvar.d/01-inspectvar.avif) --- [⬅️ Go back to main README](../../README.md) diff --git a/doc/mod/ipcalc.md b/doc/mod/ipcalc.md index 552860be..c393ec3a 100644 --- a/doc/mod/ipcalc.md +++ b/doc/mod/ipcalc.md @@ -43,7 +43,7 @@ It expects an IP address in CIDR notation as argument. $IPCalc 192.168.88.1/24; -![screenshot: IPCalc](ipcalc.d/01-ipcalc.avif) +![IPCalc](ipcalc.d/01-ipcalc.avif) ### IPCalcReturn @@ -53,7 +53,7 @@ the information in a named array. :put ([ $IPCalcReturn 192.168.88.1/24 ]->"broadcast"); -![screenshot: IPCalcReturn](ipcalc.d/02-ipcalcreturn.avif) +![IPCalcReturn](ipcalc.d/02-ipcalcreturn.avif) --- [⬅️ Go back to main README](../../README.md) diff --git a/doc/mod/notification-gotify.md b/doc/mod/notification-gotify.md index 45776286..7482ba72 100644 --- a/doc/mod/notification-gotify.md +++ b/doc/mod/notification-gotify.md @@ -38,7 +38,7 @@ and the [First Login ↗️](https://gotify.net/docs/first-login) setup. Once you have a user and account you can start creating apps. Each app is an independent notification feed for a device or application. -![screenshot: Create new app](notification-gotify.d/appsetup.avif) +![Create new app](notification-gotify.d/appsetup.avif) On creation apps are assigned a *Token* for authentification, you will need that in configuration. diff --git a/doc/mod/notification-matrix.md b/doc/mod/notification-matrix.md index f9cd4ddf..60001416 100644 --- a/doc/mod/notification-matrix.md +++ b/doc/mod/notification-matrix.md @@ -74,7 +74,7 @@ and write first part of the configuration: $SetupMatrixAuthenticate "@example:matrix.org" "v3ry-s3cr3t"; -![screenshot: authenticate](notification-matrix.d/01-authenticate.avif) +![authenticate](notification-matrix.d/01-authenticate.avif) The configuration is written to a new configuration snippet `global-config-overlay.d/mod/notification-matrix`. @@ -94,7 +94,7 @@ the invite. $SetupMatrixJoinRoom "!WUcxpSjKyxSGelouhA:matrix.org"; -![screenshot: join room](notification-matrix.d/02-join-room.avif) +![join room](notification-matrix.d/02-join-room.avif) The configuration is appended to the configuration snippet `global-config-overlay.d/mod/notification-matrix`. diff --git a/doc/mod/notification-telegram.md b/doc/mod/notification-telegram.md index 8d485801..1d2cec8c 100644 --- a/doc/mod/notification-telegram.md +++ b/doc/mod/notification-telegram.md @@ -36,7 +36,7 @@ Configuration Open Telegram, then start a chat with [BotFather ↗️](https://t.me/BotFather) and create your own bot: -![screenshot: create new bot](notification-telegram.d/01-newbot.avif) +![create new bot](notification-telegram.d/01-newbot.avif) Set that token from *BotFather* (use your own!) to `TelegramTokenId`, for now just temporarily: @@ -49,7 +49,7 @@ then send your first message. Any text will do. On your device run $GetTelegramChatId; -![screenshot: get chat id](notification-telegram.d/02-getchatid.avif) +![get chat id](notification-telegram.d/02-getchatid.avif) Finally edit `global-config-overlay`, add `TelegramTokenId` with the token from *BotFather* and `TelegramChatId` with your retrieved chat id. Then @@ -104,7 +104,7 @@ Tips & Tricks You can use a profile photo for your bot to make it recognizable. Open the chat with [BotFather ↗️](https://t.me/BotFather) and set it there. -![screenshot: set profile photo](notification-telegram.d/03-setuserpic.avif) +![set profile photo](notification-telegram.d/03-setuserpic.avif) Have a look at my [Logo Color Changer](../../contrib/logo-color.html) to create a colored version of this scripts' logo. diff --git a/doc/mod/scriptrunonce.md b/doc/mod/scriptrunonce.md index 69c6964b..e960d767 100644 --- a/doc/mod/scriptrunonce.md +++ b/doc/mod/scriptrunonce.md @@ -50,7 +50,7 @@ The function `$ScriptRunOnce` expects an URL (or name if $ScriptRunOnce https://rsc.eworm.de/main/doc/mod/scriptrunonce.d/hello-world.rsc; -![screenshot: ScriptRunOnce](scriptrunonce.d/01-scriptrunonce.avif) +![ScriptRunOnce](scriptrunonce.d/01-scriptrunonce.avif) Giving multiple scripts is possible, separated by comma. diff --git a/doc/netwatch-notify.md b/doc/netwatch-notify.md index c1f5a04b..70d6fe03 100644 --- a/doc/netwatch-notify.md +++ b/doc/netwatch-notify.md @@ -24,8 +24,8 @@ optional parent host is not down to avoid false alerts. ### Sample notifications -![notification: netwatch-notify down](netwatch-notify.d/notification-01-down.avif) -![notification: netwatch-notify up](netwatch-notify.d/notification-02-up.avif) +![netwatch-notify notification down](netwatch-notify.d/notification-01-down.avif) +![netwatch-notify notification up](netwatch-notify.d/notification-02-up.avif) Requirements and installation ----------------------------- diff --git a/doc/sms-forward.md b/doc/sms-forward.md index 75e171ab..5f038926 100644 --- a/doc/sms-forward.md +++ b/doc/sms-forward.md @@ -22,7 +22,7 @@ A broadband interface with SMS support is required. ### Sample notification -![notification: sms-forward](sms-forward.d/notification.avif) +![sms-forward notification](sms-forward.d/notification.avif) Requirements and installation ----------------------------- diff --git a/doc/telegram-chat.md b/doc/telegram-chat.md index 8988db2f..51cd3d6a 100644 --- a/doc/telegram-chat.md +++ b/doc/telegram-chat.md @@ -61,13 +61,13 @@ containing `! identity` (exclamation mark, optional space and system's identity). To query all dynamic ip addresses form a device named "*MikroTik*" send `! MikroTik`, followed by `/ip/address/print where dynamic;`. -![screenshot: chat to specific device](telegram-chat.d/01-chat-specific.avif) +![chat to specific device](telegram-chat.d/01-chat-specific.avif) Devices can be grouped to chat with them simultaneously. The default group "*all*" can be activated by sending `! @all`, which will make all devices act on your commands. -![screenshot: chat to all devices](telegram-chat.d/02-chat-all.avif) +![chat to all devices](telegram-chat.d/02-chat-all.avif) Send a single exclamation mark or non-existent identity to make all devices passive again. @@ -78,7 +78,7 @@ Let's assume you received a message from a device before, and want to send a command to that device. No need to activate it, you can just reply to that message. -![screenshot: reply to message](telegram-chat.d/03-reply.avif) +![reply to message](telegram-chat.d/03-reply.avif) Associated messages are cleared on device reboot. diff --git a/general/style.css b/general/style.css index f561766f..c3e86901 100644 --- a/general/style.css +++ b/general/style.css @@ -42,12 +42,6 @@ div.content { hr { clear: both; } -img.notification { - box-shadow: 3px 3px 7px rgba(100,100,100,0.7); -} -img.screenshot { - box-shadow: 3px 3px 7px rgba(100,100,100,0.7); -} img.logo { float: left; /* border-radius: 50%; */ @@ -72,7 +66,6 @@ pre { pre.code { background-color: #f8f8f8; border: 1px solid #ccc; - box-shadow: 3px 3px 7px rgba(100,100,100,0.7); overflow: auto; padding: 6px 10px; border-radius: 3px; diff --git a/global-config.rsc b/global-config.rsc index 0bb572b5..12c85916 100644 --- a/global-config.rsc +++ b/global-config.rsc @@ -90,9 +90,7 @@ # Toggle this to disable color output in terminal/cli. :global TerminalColorOutput true; -# This defines whether to add date & time in filenames, what backups to generate, -# the password to use, and what random delay (between 0 and given seconds) to apply. -:global BackupFileNameDate false; +# This defines what backups to generate and what password to use. :global BackupSendBinary false; :global BackupSendExport true; :global BackupSendGlobalConfig true; diff --git a/global-functions.rsc b/global-functions.rsc index 30b0ccbc..413517f3 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -15,7 +15,7 @@ # Git commit id & info, expected configuration version :global CommitId "unknown"; :global CommitInfo "unknown"; -:global ExpectedConfigVersion 143; +:global ExpectedConfigVersion 142; # global variables not to be changed by user :global GlobalFunctionsReady false; @@ -310,7 +310,7 @@ :for I from=0 to=([ :len $Input ] - 1) do={ :local Char [ :pick $Input $I ]; - :if ([ :typeof [ :find "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" $Char ] ] = "nil") do={ + :if ([ :typeof [ find "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" $Char ] ] = "nil") do={ :do { :if ([ :len $Return ] = 0) do={ :error true; @@ -812,15 +812,10 @@ # check if DNS is resolving :set IsDNSResolving do={ :do { - :local I 1; - :retry { - :set I ($I ^ 1); - :resolve ("low-ttl.eworm." . ({ "de"; "net" }->$I)); - } delay=50ms max=6; + :resolve "low-ttl.eworm.de"; } on-error={ :return false; } - :return true; } @@ -1205,12 +1200,10 @@ } :onerror Err { - /file/remove [ find where name=$DirName ]; + /file/remove $DirName; } do={ - :if (!($Err ~ "no such item")) do={ - $LogPrint error $0 ("Removing directory '" . $DirName . "' failed: " . $Err); - :return false; - } + $LogPrint error $0 ("Removing directory '" . $DirName . "' failed: " . $Err); + :return false; } :return true; } @@ -1236,12 +1229,10 @@ } :onerror Err { - /file/remove [ find where name=$FileName ]; + /file/remove $FileName; } do={ - :if (!($Err ~ "no such item")) do={ - $LogPrint error $0 ("Removing file '" . $FileName . "' failed: " . $Err); - :return false; - } + $LogPrint error $0 ("Removing file '" . $FileName . "' failed: " . $Err); + :return false; } :return true; } @@ -1301,8 +1292,7 @@ :global SymbolForNotification; :global ValidateSyntax; - :if ([ $CertificateAvailable "ISRG Root X2" "fetch" ] = false || \ - [ $CertificateAvailable "Root YE" "fetch" ] = false) do={ + :if ([ $CertificateAvailable "Root YE" "fetch" ] = false) do={ $LogPrint warning $0 ("Downloading certificate failed, trying without."); } diff --git a/ipv6-update.rsc b/ipv6-update.rsc index f93e2786..dadca54c 100644 --- a/ipv6-update.rsc +++ b/ipv6-update.rsc @@ -54,7 +54,7 @@ :local Pool [ /ipv6/pool/get [ find where prefix=$PdPrefix ] name ]; :if ([ :len [ /ipv6/firewall/address-list/find where comment=("ipv6-pool-" . $Pool) ] ] = 0) do={ /ipv6/firewall/address-list/add list=("ipv6-pool-" . $Pool) address=:: comment=("ipv6-pool-" . $Pool) dynamic=yes; - $LogPrint info $ScriptName ("Added dynamic ipv6 address list entry for ipv6-pool-" . $Pool); + $LogPrint warning $ScriptName ("Added dynamic ipv6 address list entry for ipv6-pool-" . $Pool); } :local AddrList [ /ipv6/firewall/address-list/find where comment=("ipv6-pool-" . $Pool) ]; :local OldPrefix [ /ipv6/firewall/address-list/get ($AddrList->0) address ]; diff --git a/netwatch-dns.rsc b/netwatch-dns.rsc index 7c6a7b5b..9531d4ad 100644 --- a/netwatch-dns.rsc +++ b/netwatch-dns.rsc @@ -115,15 +115,13 @@ :local Data false; :onerror Err { - :local I 1; :retry { - :set I ($I ^ 1); :set Data ([ /tool/fetch check-certificate=yes-without-crl output=user \ http-header-field=({ "accept: application/dns-message" }) \ url=(($DohServer->"doh-url") . "?dns=" . [ :convert to=base64 ([ :rndstr length=2 ] . \ - "\01\00" . "\00\01" . "\00\00" . "\00\00" . "\00\00" . "\09doh-check\05eworm" . \ - ({ "\02de"; "\03net" }->$I) . "\00" . "\00\10" . "\00\01") ]) as-value ]->"data"); - } delay=500ms max=6; + "\01\00" . "\00\01" . "\00\00" . "\00\00" . "\00\00" . "\09doh-check\05eworm\02de\00" . \ + "\00\10" . "\00\01") ]) as-value ]->"data"); + } delay=1s max=3; } do={ $LogPrint warning $ScriptName ("Request to DoH server " . ($DohServer->"doh-url") . \ " failed: " . $Err); diff --git a/news-and-changes.rsc b/news-and-changes.rsc index ed60a6c2..2c1a0272 100644 --- a/news-and-changes.rsc +++ b/news-and-changes.rsc @@ -67,7 +67,6 @@ 140="The scripts 'lease-script' was renamed to 'dhcpv4-server-lease', configuration was updated automatically."; 141="Introduced script 'dhcpv6-client-lease' to run several scripts on IPv6 DHCP client lease."; 142="Added a setting for 'mod/notification-email' to check availability of certificate chain."; - 143="Made backup scripts 'backup-email' and 'backup-upload' support date & time in filenames."; }; # Migration steps to be applied on script updates