Compare commits

...

76 commits

Author SHA1 Message Date
Christian Hesse a223ca2eb4 update-tunnelbroker: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 70c1a52475 update-gre-address: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 5617bccaae telegram-chat: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse ebace25796 sms-forward: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 6ca27bda7b sms-action: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 5fa8895877 ppp-on-up: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse d45d45cefe packages-update: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse daa080b702 ospf-to-leds: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse f34ec4d83f netwatch-notify: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse ad757a240c netwatch-dns: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 710030d115 mode-button: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse df0e394891 log-forward: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 01206f5519 lease-script: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 261d125e1b ipv6-update: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 783e28639f ipsec-to-dns: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 3ca1a6154c hotspot-to-wpa-cleanup: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 3c5b77d460 hotspot-to-wpa: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 9fe01c8c9d gps-track: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 329a9d596d global-wait: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse c715e06436 global-functions: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 5cb4dfdb27 fw-addr-lists: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 27cbcf24d1 firmware-upgrade-reboot: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 727a8a0467 dhcp-to-dns: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 225e3c7e09 dhcp-lease-comment: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 5a88ef40dc daily-psk.capsman: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 374662130a collect-wireless-mac: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 9fc53decc2 check-routeros-update: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 06ae7bea7e check-lte-firmware-upgrade: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse d6647a04e8 check-health: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 862392ff45 check-certificates: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 453760cc2e certificate-renew-issued: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 0c72cd6efc capsman-rolling-upgrade: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 304c698a66 capsman-download-packages: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 5d4ba511c6 backup-upload: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse fb0985486b backup-partition: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 9376827b19 backup-email: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse b078d02030 backup-cloud: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 030b1026c2 accesslist-duplicates: use :jobname to get script name 2024-01-08 17:37:48 +01:00
Christian Hesse 4249ad61df global-functions: $CertificateDownload: move delay up
We still had cases where fetch misbehaves... But this was permanent.
Perhaps we should not touch the certificate too early...
2024-01-08 00:29:18 +01:00
Christian Hesse 8c458592f5 check-lte-firmware-upgrade: unbreak terminal detectiono
This broke with commit 50d7e1fa41b8f8a6a1379de5521798346fd1ae9f... 🫣
2024-01-07 23:13:54 +01:00
Christian Hesse 0760ea9121 check-lte-firmware-upgrade: fail on empty version string 2024-01-05 17:05:34 +01:00
Christian Hesse 9a73fc526f update copyright for 2024 2024-01-01 15:25:25 +01:00
Christian Hesse 777c388b43 global-functions: $GetMacVendor: get new certificate
The service now uses: GTS CA 1P5 -> GTS Root R1
2023-12-22 14:47:54 +01:00
Christian Hesse 1c26d08267 mod/ssh-keys-import: unbreak import from file
Looks like this broke in c3045f3723 where
a non-existent variable name was used.
2023-12-21 11:34:55 +01:00
Christian Hesse 0377064f65 capsman-download-packages: avaiable packages only...
... as things became more complicated with 'wifi-qcom*'.
2023-12-20 12:29:24 +01:00
Christian Hesse 5aaa24b507 capsman-download-packages: use default set for legacy capsman...
... as well - now that 'wireless' package has been split from 'routeros'
guessing kind of broke. It required several attempts and intermittent
errors in logs to get things right.
2023-12-20 12:11:12 +01:00
Christian Hesse 5fdc8d9e65 doc/mode-button: document required type of led 2023-12-14 08:54:04 +01:00
Christian Hesse f9528f0ac5 fw-addr-lists: warn on possible truncation
... as fetch truncates data at about 64kB, reported in SUP-132297.
2023-12-13 15:57:28 +01:00
Christian Hesse db5ff00b5a doc/capsman-download-packages: mention package-path 2023-12-05 11:01:14 +01:00
Christian Hesse 69af869572 mention the donation hint... 2023-12-05 00:11:19 +01:00
Christian Hesse 52b8e67309 celebrating 1.000 stars on Github! 2023-12-05 00:11:19 +01:00
Christian Hesse d3611cebbd mod/notification-email: $NotificationFunctions->"email": support hook for signature
You can compose your own signature by creating a function:

:global NotificationEMailSignature do={
  :global EitherOr;

  :local RouterBoard [ /system/routerboard/get ];
  :return ( \
    [ $EitherOr ($RouterBoard->"board-name") ($RouterBoard->"model") ] . " s/n " . $RouterBoard->"serial-number" . " | " . \
    "RouterOS " . [ /system/package/update/get installed-version ] . " | " . \
    "IP " . [ /ip/cloud/get public-address ]);
}
2023-12-05 00:11:19 +01:00
Christian Hesse 9fb596135e check-certificates: properly renew from template 2023-12-05 00:11:19 +01:00
Christian Hesse a12ccba29e check-certificates: improve wording 2023-12-05 00:11:19 +01:00
Christian Hesse 8de6995c4b check-certificates: add workaround for broken certificates...
... where the issuer array is borked. Or is this a RouterOS issue?

[eworm@carpo] > $InspectVar [ $ParseKeyValueStore  [ /certificate/get ISRG-Root-X2 issuer ] ]
-type-> array
  -key-> C
    -type-> str
    -value-> US,O=Internet Security Research Group,CN=ISRG Root X2

A good certificate looks like this:

[eworm@carpo] > $InspectVar [ $ParseKeyValueStore  [ /certificate/get [ find where name~"eworm.net" ] issuer ] ]
-type-> array
  -key-> C
    -type-> str
    -value-> US
  -key-> CN
    -type-> str
    -value-> E1
  -key-> O
    -type-> str
    -value-> Let's Encrypt
2023-12-04 13:05:46 +01:00
Christian Hesse a08df7bdec check-certificates: prevent infinte loop 2023-12-04 13:05:46 +01:00
Christian Hesse 3df99b0ee0 check-certificates: give full certificate chain 2023-12-04 13:05:46 +01:00
Christian Hesse 94607496ae check-certificates: fix typo and syntax 2023-12-04 12:15:10 +01:00
Christian Hesse e4b10d4b76 mod/notification-email: $QuotedPrintable: also encode question mark
Following the RFC it is not required, but looks like Thunderbird has an
issue here...

https://datatracker.ietf.org/doc/html/rfc2045#section-6.7
2023-12-04 12:08:47 +01:00
Christian Hesse 84368ec6eb mod/notification-email: $QuotedPrintable: minor rework
We have to encode all characters from 0x00 to 0x1f as well...
Also the equal sign is nothing special here, just adding to list.
2023-12-04 12:08:47 +01:00
Christian Hesse 1bb2871e0b global-functions: $FormatLine: use $CharacterMultiply 2023-12-04 12:08:47 +01:00
Christian Hesse 5e2e65b252 global-functions: $AlignRight: use $CharacterMultiply 2023-12-04 12:08:47 +01:00
Christian Hesse 8f24b4c490 global-functions: introduce $CharacterMultiply 2023-12-04 11:22:36 +01:00
Christian Hesse 15e347303b global-functions: $DeviceInfo: add SNMP location and contact 2023-12-04 09:33:24 +01:00
Christian Hesse aba4770395 fw-addr-lists: support timeout per list
This works with something like this:

    :global FwAddrLists {
      "allow"={
        { url="https://eworm.de/ros/fw-addr-lists/allow";
          cert="E1"; timeout=1w };
      };
      ...
    }

All urls for one named list should have the same timeout! With different
timeout values and identical addresses the behavior is besically undefined,
depending on order.
2023-11-30 13:51:57 +01:00
Christian Hesse c6bf722e49 global-functions: introduce $MIN 2023-11-30 13:51:57 +01:00
Christian Hesse 495eff48de global-functions: introduce $MAX 2023-11-30 13:51:57 +01:00
Christian Hesse 080bef89a9 global-functions: $SymbolByUnicodeName: rename up-arrow -> arrow-up
... so arrows are grouped in case we add more.
2023-11-30 13:51:57 +01:00
Christian Hesse 4e1d54d733 global-functions: $SymbolForNotification: properly append space to alt text 2023-11-30 13:51:57 +01:00
Christian Hesse 81a86ee043 netwatch-dns: get doh host name from static dns 2023-11-27 18:21:47 +01:00
Christian Hesse 1cc0e3429b global-functions: introduce $AlignRight 2023-11-23 14:41:46 +01:00
Christian Hesse cae5f425a6 telegram-chat: get rid of '.txt' file extension 2023-11-22 21:20:44 +01:00
Christian Hesse d1abbede75 backup-email: get rid of '.txt' file extension 2023-11-22 21:18:39 +01:00
Christian Hesse b75b0bf6be backup-upload: get rid of '.txt' file extension 2023-11-22 21:17:44 +01:00
Christian Hesse 11daef75f0 packages-update: refuse automatic update to RouterOS 7.13
... as migration to wireless or wifi package has to be done. Please
update manually by running:

    /system/package/update/install
2023-11-21 13:14:51 +01:00
Christian Hesse ab8c9d04ff check-routeros-update: rename scheduler
This was missing for commit f7c72b6ed96e45bf1fbb54c46ce09e1fccc791be...
2023-11-16 13:18:10 +01:00
89 changed files with 588 additions and 267 deletions

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: accesslist-duplicates.capsman
# Copyright (c) 2018-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# requires RouterOS, version=7.12beta1
@ -10,7 +10,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "accesslist-duplicates.capsman";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: accesslist-duplicates.local
# Copyright (c) 2018-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# requires RouterOS, version=7.12beta1
@ -10,7 +10,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "accesslist-duplicates.local";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: accesslist-duplicates%TEMPL%
# Copyright (c) 2018-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# requires RouterOS, version=7.12beta1
@ -11,7 +11,7 @@
# !! This is just a template to generate the real script!
# !! Pattern '%TEMPL%' is replaced, paths are filtered.
:local 0 "accesslist-duplicates%TEMPL%";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: accesslist-duplicates.wifi
# Copyright (c) 2018-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# requires RouterOS, version=7.12beta1
@ -10,7 +10,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "accesslist-duplicates.wifi";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: accesslist-duplicates.wifiwave2
# Copyright (c) 2018-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# requires RouterOS, version=7.12beta1
@ -10,7 +10,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "accesslist-duplicates.wifiwave2";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: backup-cloud
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# provides: backup-script, order=40
@ -8,7 +8,7 @@
# upload backup to MikroTik cloud
# https://git.eworm.de/cgit/routeros-scripts/about/doc/backup-cloud.md
:local 0 "backup-cloud";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: backup-email
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# provides: backup-script, order=20
@ -8,7 +8,7 @@
# create and email backup and config file
# https://git.eworm.de/cgit/routeros-scripts/about/doc/backup-email.md
:local 0 "backup-email";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
@ -82,10 +82,10 @@ $WaitFullyConnected;
:if ($BackupSendGlobalConfig = true) do={
# Do *NOT* use '/file/add ...' here, as it is limited to 4095 bytes!
:execute script={ :put [ /system/script/get global-config-overlay source ]; } \
file=($FilePath . ".conf");
$WaitForFile ($FilePath . ".conf.txt");
:set ConfigFile ($FileName . ".conf.txt");
:set Attach ($Attach, ($FilePath . ".conf.txt"));
file=($FilePath . ".conf\00");
$WaitForFile ($FilePath . ".conf");
:set ConfigFile ($FileName . ".conf");
:set Attach ($Attach, ($FilePath . ".conf"));
}
# send email with status and files

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: backup-partition
# Copyright (c) 2022-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2022-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# provides: backup-script, order=70
@ -8,7 +8,7 @@
# save configuration to fallback partition
# https://git.eworm.de/cgit/routeros-scripts/about/doc/backup-partition.md
:local 0 "backup-partition";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: backup-upload
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# provides: backup-script, order=50
@ -8,7 +8,7 @@
# create and upload backup and config file
# https://git.eworm.de/cgit/routeros-scripts/about/doc/backup-upload.md
:local 0 "backup-upload";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
@ -103,12 +103,12 @@ $WaitFullyConnected;
:if ($BackupSendGlobalConfig = true) do={
# Do *NOT* use '/file/add ...' here, as it is limited to 4095 bytes!
:execute script={ :put [ /system/script/get global-config-overlay source ]; } \
file=($FilePath . ".conf");
$WaitForFile ($FilePath . ".conf.txt");
file=($FilePath . ".conf\00");
$WaitForFile ($FilePath . ".conf");
:do {
/tool/fetch upload=yes url=($BackupUploadUrl . "/" . $FileName . ".conf") \
user=$BackupUploadUser password=$BackupUploadPass src-path=($FilePath . ".conf.txt");
user=$BackupUploadUser password=$BackupUploadPass src-path=($FilePath . ".conf");
:set ConfigFile [ /file/get ($FilePath . ".conf") ];
:set ($ConfigFile->"name") ($FileName . ".conf");
} on-error={
@ -117,7 +117,7 @@ $WaitFullyConnected;
:set Failed 1;
}
/file/remove ($FilePath . ".conf.txt");
/file/remove ($FilePath . ".conf");
}
:local FileInfo do={

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: capsman-download-packages.capsman
# Copyright (c) 2018-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
@ -9,7 +9,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "capsman-download-packages.capsman";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
@ -53,29 +53,14 @@ $WaitFullyConnected;
}
}
:if ([ :len [ /system/logging/find where topics~"error" !(topics~"!error") \
!(topics~"!caps") action=memory !disabled !invalid ] ] < 1) do={
$LogPrintExit2 warning $0 ("Looks like error messages for 'caps' are not sent to memory. " . \
"Probably can not download packages automatically.") false;
} else={
:if ($Updated = false && [ /system/resource/get uptime ] < 2m) do={
$LogPrintExit2 info $0 ("No packages downloaded, yet. Delaying for logs.") false;
:delay 2m;
}
}
:foreach Log in=[ /log/find where topics=({"caps"; "error"}) \
message~("upgrade status: failed, failed to download file '.*-" . $InstalledVersion . \
"-.*\\.npk', no such file") ] do={
:local Message [ /log/get $Log message ];
:local Package [ :pick $Message \
([ :find $Message "'" ] + 1) \
[ :find $Message ("-" . $InstalledVersion . "-") ] ];
:local Arch [ :pick $Message \
([ :find $Message ("-" . $InstalledVersion . "-") ] + 2 + [ :len $InstalledVersion ]) \
[ :find $Message ".npk" ] ];
:if ([ $DownloadPackage $Package $InstalledVersion $Arch $PackagePath ] = true) do={
:set Updated true;
:if ([ :len [ /file/find where type=package name~("^" . $PackagePath) ] ] = 0) do={
$LogPrintExit2 info $0 ("No packages available, downloading default set.") false;
:foreach Arch in={ "arm"; "mipsbe" } do={
:foreach Package in={ "routeros"; "wireless" } do={
:if ([ $DownloadPackage $Package $InstalledVersion $Arch $PackagePath ] = true) do={
:set Updated true;
}
}
}
}

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: capsman-download-packages%TEMPL%
# Copyright (c) 2018-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
@ -10,7 +10,7 @@
# !! This is just a template to generate the real script!
# !! Pattern '%TEMPL%' is replaced, paths are filtered.
:local 0 "capsman-download-packages%TEMPL%";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
@ -56,52 +56,31 @@ $WaitFullyConnected;
}
}
# NOT /interface/wifi/ #
# NOT /interface/wifiwave2/ #
:if ([ :len [ /system/logging/find where topics~"error" !(topics~"!error") \
!(topics~"!caps") action=memory !disabled !invalid ] ] < 1) do={
$LogPrintExit2 warning $0 ("Looks like error messages for 'caps' are not sent to memory. " . \
"Probably can not download packages automatically.") false;
} else={
:if ($Updated = false && [ /system/resource/get uptime ] < 2m) do={
$LogPrintExit2 info $0 ("No packages downloaded, yet. Delaying for logs.") false;
:delay 2m;
}
}
:foreach Log in=[ /log/find where topics=({"caps"; "error"}) \
message~("upgrade status: failed, failed to download file '.*-" . $InstalledVersion . \
"-.*\\.npk', no such file") ] do={
:local Message [ /log/get $Log message ];
:local Package [ :pick $Message \
([ :find $Message "'" ] + 1) \
[ :find $Message ("-" . $InstalledVersion . "-") ] ];
:local Arch [ :pick $Message \
([ :find $Message ("-" . $InstalledVersion . "-") ] + 2 + [ :len $InstalledVersion ]) \
[ :find $Message ".npk" ] ];
:if ([ $DownloadPackage $Package $InstalledVersion $Arch $PackagePath ] = true) do={
:set Updated true;
}
}
# NOT /interface/wifiwave2/ #
# NOT /interface/wifi/ #
# NOT /caps-man/ #
:if ([ :len [ /file/find where type=package name~("^" . $PackagePath) ] ] = 0) do={
$LogPrintExit2 info $0 ("No packages available, downloading default set.") false;
# NOT /interface/wifi/ #
# NOT /interface/wifiwave2/ #
:foreach Arch in={ "arm"; "mipsbe" } do={
:foreach Package in={ "routeros"; "wireless" } do={
# NOT /interface/wifi/ #
# NOT /interface/wifiwave2/ #
# NOT /caps-man/ #
:foreach Arch in={ "arm"; "arm64" } do={
# NOT /interface/wifi/ #
:foreach Package in={ "routeros"; "wifiwave2" } do={
# NOT /interface/wifi/ #
# NOT /interface/wifiwave2/ #
:foreach Package in={ "routeros"; "wifi-qcom"; "wifi-qcom-ac" } do={
:local Packages { "arm"={ "routeros"; "wifi-qcom"; "wifi-qcom-ac" };
"arm64"={ "routeros"; "wifi-qcom" } };
:foreach Package in=($Packages->$Arch) do={
# NOT /interface/wifiwave2/ #
# NOT /caps-man/ #
:if ([ $DownloadPackage $Package $InstalledVersion $Arch $PackagePath ] = true) do={
:set Updated true;
}
}
}
}
# NOT /caps-man/ #
:if ($Updated = true) do={
:local Script ([ /system/script/find where source~"\n# provides: capsman-rolling-upgrade\n" ]->0);

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: capsman-download-packages.wifi
# Copyright (c) 2018-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
@ -9,7 +9,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "capsman-download-packages.wifi";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
@ -56,7 +56,9 @@ $WaitFullyConnected;
:if ([ :len [ /file/find where type=package name~("^" . $PackagePath) ] ] = 0) do={
$LogPrintExit2 info $0 ("No packages available, downloading default set.") false;
:foreach Arch in={ "arm"; "arm64" } do={
:foreach Package in={ "routeros"; "wifi-qcom"; "wifi-qcom-ac" } do={
:local Packages { "arm"={ "routeros"; "wifi-qcom"; "wifi-qcom-ac" };
"arm64"={ "routeros"; "wifi-qcom" } };
:foreach Package in=($Packages->$Arch) do={
:if ([ $DownloadPackage $Package $InstalledVersion $Arch $PackagePath ] = true) do={
:set Updated true;
}

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: capsman-download-packages.wifiwave2
# Copyright (c) 2018-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
@ -9,7 +9,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "capsman-download-packages.wifiwave2";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: capsman-rolling-upgrade.capsman
# Copyright (c) 2018-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
@ -11,7 +11,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "capsman-rolling-upgrade.capsman";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: capsman-rolling-upgrade%TEMPL%
# Copyright (c) 2018-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
@ -12,7 +12,7 @@
# !! This is just a template to generate the real script!
# !! Pattern '%TEMPL%' is replaced, paths are filtered.
:local 0 "capsman-rolling-upgrade%TEMPL%";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: capsman-rolling-upgrade.wifi
# Copyright (c) 2018-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
@ -11,7 +11,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "capsman-rolling-upgrade.wifi";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: capsman-rolling-upgrade.wifiwave2
# Copyright (c) 2018-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
@ -11,7 +11,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "capsman-rolling-upgrade.wifiwave2";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,12 +1,12 @@
#!rsc by RouterOS
# RouterOS script: certificate-renew-issued
# Copyright (c) 2019-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2019-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# renew locally issued certificates
# https://git.eworm.de/cgit/routeros-scripts/about/doc/certificate-renew-issued.md
:local 0 "certificate-renew-issued";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

238
certs/GTS CA 1P5.pem Normal file
View file

@ -0,0 +1,238 @@
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
02:03:bc:50:a3:27:53:f0:91:80:22:ed:f1
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=US, O=Google Trust Services LLC, CN=GTS Root R1
Validity
Not Before: Aug 13 00:00:42 2020 GMT
Not After : Sep 30 00:00:42 2027 GMT
Subject: C=US, O=Google Trust Services LLC, CN=GTS CA 1P5
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
00:b3:82:f0:24:8c:bf:2d:87:af:b2:d9:a7:ae:fa:
ca:ba:44:d6:5b:3e:fe:b2:f7:b2:65:16:dc:de:10:
e8:4f:2d:10:58:5a:28:86:87:a1:ee:6a:b3:a0:d9:
75:4f:7f:a1:52:01:8b:55:a8:4a:5b:06:48:c8:36:
12:25:ab:89:f9:f2:23:5f:9d:60:65:f9:5c:da:be:
3a:e8:5c:6d:7d:9c:d0:84:18:85:30:cd:4e:9b:ec:
3c:d8:b3:e1:96:d4:f3:c5:0b:65:db:8f:b0:74:cb:
f6:1e:f3:78:f1:ac:95:c5:dd:73:c3:31:88:81:af:
74:aa:6f:fd:0c:e3:05:95:f0:c5:10:4f:65:63:fa:
a0:af:c6:18:3d:c5:a1:df:97:79:d7:05:89:b3:30:
b0:74:ae:3d:92:10:6b:8c:15:77:dd:0b:04:57:fb:
81:03:dd:ea:22:34:d5:e5:56:b2:f0:c4:8d:41:b1:
c3:02:db:62:ec:80:d0:ff:76:d4:86:e4:04:1a:b6:
b6:0c:2b:62:71:7d:d9:af:d9:f1:5e:fa:c0:1e:ca:
a0:19:5c:55:f0:80:d1:2a:0c:07:86:90:9f:35:e3:
28:2b:5b:ef:23:c8:a3:1d:a4:a3:3a:ee:fe:83:dc:
82:4c:25:b0:4d:c5:51:ad:9e:9b:d3:5b:84:c2:1a:
5a:e9
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Key Usage: critical
Digital Signature, Certificate Sign, CRL Sign
X509v3 Extended Key Usage:
TLS Web Server Authentication, TLS Web Client Authentication
X509v3 Basic Constraints: critical
CA:TRUE, pathlen:0
X509v3 Subject Key Identifier:
D5:FC:9E:0D:DF:1E:CA:DD:08:97:97:6E:2B:C5:5F:C5:2B:F5:EC:B8
X509v3 Authority Key Identifier:
E4:AF:2B:26:71:1A:2B:48:27:85:2F:52:66:2C:EF:F0:89:13:71:3E
Authority Information Access:
OCSP - URI:http://ocsp.pki.goog/gtsr1
CA Issuers - URI:http://pki.goog/repo/certs/gtsr1.der
X509v3 CRL Distribution Points:
Full Name:
URI:http://crl.pki.goog/gtsr1/gtsr1.crl
X509v3 Certificate Policies:
Policy: 1.3.6.1.4.1.11129.2.5.3
CPS: https://pki.goog/repository/
Policy: 2.23.140.1.2.1
Signature Algorithm: sha256WithRSAEncryption
Signature Value:
6c:63:27:ee:23:df:e5:52:68:4d:81:66:91:85:df:7d:65:e5:
5b:37:31:08:26:b2:07:5d:9a:be:b1:ca:01:b9:ad:bf:9d:77:
f6:51:1d:d7:98:c5:0b:49:a1:7b:a1:d7:d3:68:e5:44:0f:8b:
ba:36:dd:42:82:77:d2:8d:dd:f5:3f:fb:eb:c8:07:98:93:ee:
5a:d0:b5:3d:de:4b:1c:2d:8c:4d:ec:7e:8c:7b:fe:4e:40:fd:
f0:b4:b3:59:02:10:51:5c:e3:c0:2b:fd:b7:06:48:51:7e:09:
5e:3f:0f:dc:a7:fe:97:e7:79:c5:0e:44:89:78:c5:69:59:29:
a0:9a:3a:48:36:29:a6:94:93:55:2d:b8:47:b5:e9:96:b5:9f:
07:cd:a6:ab:3e:32:8a:c0:86:83:c5:c1:41:c8:9f:2f:35:8e:
0d:c0:07:7a:e1:ac:c9:65:b5:cb:8a:a7:dd:71:d8:61:65:39:
84:ac:32:3e:f7:7a:36:f1:56:9f:57:a9:41:6d:5a:90:a7:db:
3a:ea:75:80:0c:63:0b:69:74:6f:07:4c:15:f3:37:28:a5:19:
a4:6e:f5:f6:20:cd:63:b2:7e:c4:2b:09:75:89:da:d1:3c:2e:
72:4f:36:1a:a1:9e:44:d0:cd:9b:a6:23:08:3f:97:a1:a7:9e:
5a:a5:f7:09:94:ad:5d:76:5d:28:56:d1:1a:66:51:51:07:7b:
de:3d:b0:c8:ef:30:7a:24:2d:be:b8:b3:86:f6:4b:f7:f0:b5:
4f:ff:ce:c6:f9:f6:3f:2a:27:08:0f:09:3e:23:5a:c7:e3:42:
2d:7a:36:e4:3d:98:96:60:39:98:ea:d1:db:63:2a:eb:78:09:
b1:4e:21:b3:8e:b7:ce:3e:92:f1:95:5c:a4:39:d0:c0:2b:c8:
53:15:f5:d2:2f:82:cd:06:74:67:99:90:77:37:0a:97:2d:c5:
1c:1e:f4:d0:5b:e9:15:e3:ea:02:09:c8:13:d7:13:70:65:bf:
fb:88:9b:5a:25:be:77:09:e1:a7:6a:4e:11:75:b9:1e:4d:f1:
00:1b:6a:66:79:8e:c3:6e:d8:6d:a2:22:a2:6d:05:fb:2c:f2:
f1:50:e5:a0:d1:d8:9f:35:7d:fc:70:ab:59:2a:02:f1:be:b0:
d3:f1:f8:cd:12:b9:6a:25:90:5b:e3:85:20:e6:f5:da:cb:40:
1c:19:34:20:03:61:77:ba:7f:48:0f:49:0b:29:eb:e7:61:64:
c7:63:d1:47:eb:1c:e1:ee:94:46:ef:39:73:cc:ee:4f:2b:8d:
dc:fb:58:a7:b3:65:20:99:95:b9:fb:55:6f:d7:96:6e:94:3d:
f4:7a:92:8e:63:1d:df:6d
-----BEGIN CERTIFICATE-----
MIIFjDCCA3SgAwIBAgINAgO8UKMnU/CRgCLt8TANBgkqhkiG9w0BAQsFADBHMQsw
CQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEU
MBIGA1UEAxMLR1RTIFJvb3QgUjEwHhcNMjAwODEzMDAwMDQyWhcNMjcwOTMwMDAw
MDQyWjBGMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZp
Y2VzIExMQzETMBEGA1UEAxMKR1RTIENBIDFQNTCCASIwDQYJKoZIhvcNAQEBBQAD
ggEPADCCAQoCggEBALOC8CSMvy2Hr7LZp676yrpE1ls+/rL3smUW3N4Q6E8tEFha
KIaHoe5qs6DZdU9/oVIBi1WoSlsGSMg2EiWrifnyI1+dYGX5XNq+OuhcbX2c0IQY
hTDNTpvsPNiz4ZbU88ULZduPsHTL9h7zePGslcXdc8MxiIGvdKpv/QzjBZXwxRBP
ZWP6oK/GGD3Fod+XedcFibMwsHSuPZIQa4wVd90LBFf7gQPd6iI01eVWsvDEjUGx
wwLbYuyA0P921IbkBBq2tgwrYnF92a/Z8V76wB7KoBlcVfCA0SoMB4aQnzXjKCtb
7yPIox2kozru/oPcgkwlsE3FUa2em9NbhMIaWukCAwEAAaOCAXYwggFyMA4GA1Ud
DwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwEgYDVR0T
AQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQU1fyeDd8eyt0Il5duK8VfxSv17LgwHwYD
VR0jBBgwFoAU5K8rJnEaK0gnhS9SZizv8IkTcT4waAYIKwYBBQUHAQEEXDBaMCYG
CCsGAQUFBzABhhpodHRwOi8vb2NzcC5wa2kuZ29vZy9ndHNyMTAwBggrBgEFBQcw
AoYkaHR0cDovL3BraS5nb29nL3JlcG8vY2VydHMvZ3RzcjEuZGVyMDQGA1UdHwQt
MCswKaAnoCWGI2h0dHA6Ly9jcmwucGtpLmdvb2cvZ3RzcjEvZ3RzcjEuY3JsME0G
A1UdIARGMEQwOAYKKwYBBAHWeQIFAzAqMCgGCCsGAQUFBwIBFhxodHRwczovL3Br
aS5nb29nL3JlcG9zaXRvcnkvMAgGBmeBDAECATANBgkqhkiG9w0BAQsFAAOCAgEA
bGMn7iPf5VJoTYFmkYXffWXlWzcxCCayB12avrHKAbmtv5139lEd15jFC0mhe6HX
02jlRA+LujbdQoJ30o3d9T/768gHmJPuWtC1Pd5LHC2MTex+jHv+TkD98LSzWQIQ
UVzjwCv9twZIUX4JXj8P3Kf+l+d5xQ5EiXjFaVkpoJo6SDYpppSTVS24R7XplrWf
B82mqz4yisCGg8XBQcifLzWODcAHeuGsyWW1y4qn3XHYYWU5hKwyPvd6NvFWn1ep
QW1akKfbOup1gAxjC2l0bwdMFfM3KKUZpG719iDNY7J+xCsJdYna0Twuck82GqGe
RNDNm6YjCD+XoaeeWqX3CZStXXZdKFbRGmZRUQd73j2wyO8weiQtvrizhvZL9/C1
T//Oxvn2PyonCA8JPiNax+NCLXo25D2YlmA5mOrR22Mq63gJsU4hs463zj6S8ZVc
pDnQwCvIUxX10i+CzQZ0Z5mQdzcKly3FHB700FvpFePqAgnIE9cTcGW/+4ibWiW+
dwnhp2pOEXW5Hk3xABtqZnmOw27YbaIiom0F+yzy8VDloNHYnzV9/HCrWSoC8b6w
0/H4zRK5aiWQW+OFIOb12stAHBk0IANhd7p/SA9JCynr52Fkx2PRR+sc4e6URu85
c8zuTyuN3PtYp7NlIJmVuftVb9eWbpQ99HqSjmMd320=
-----END CERTIFICATE-----
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
02:03:e5:93:6f:31:b0:13:49:88:6b:a2:17
Signature Algorithm: sha384WithRSAEncryption
Issuer: C=US, O=Google Trust Services LLC, CN=GTS Root R1
Validity
Not Before: Jun 22 00:00:00 2016 GMT
Not After : Jun 22 00:00:00 2036 GMT
Subject: C=US, O=Google Trust Services LLC, CN=GTS Root R1
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (4096 bit)
Modulus:
00:b6:11:02:8b:1e:e3:a1:77:9b:3b:dc:bf:94:3e:
b7:95:a7:40:3c:a1:fd:82:f9:7d:32:06:82:71:f6:
f6:8c:7f:fb:e8:db:bc:6a:2e:97:97:a3:8c:4b:f9:
2b:f6:b1:f9:ce:84:1d:b1:f9:c5:97:de:ef:b9:f2:
a3:e9:bc:12:89:5e:a7:aa:52:ab:f8:23:27:cb:a4:
b1:9c:63:db:d7:99:7e:f0:0a:5e:eb:68:a6:f4:c6:
5a:47:0d:4d:10:33:e3:4e:b1:13:a3:c8:18:6c:4b:
ec:fc:09:90:df:9d:64:29:25:23:07:a1:b4:d2:3d:
2e:60:e0:cf:d2:09:87:bb:cd:48:f0:4d:c2:c2:7a:
88:8a:bb:ba:cf:59:19:d6:af:8f:b0:07:b0:9e:31:
f1:82:c1:c0:df:2e:a6:6d:6c:19:0e:b5:d8:7e:26:
1a:45:03:3d:b0:79:a4:94:28:ad:0f:7f:26:e5:a8:
08:fe:96:e8:3c:68:94:53:ee:83:3a:88:2b:15:96:
09:b2:e0:7a:8c:2e:75:d6:9c:eb:a7:56:64:8f:96:
4f:68:ae:3d:97:c2:84:8f:c0:bc:40:c0:0b:5c:bd:
f6:87:b3:35:6c:ac:18:50:7f:84:e0:4c:cd:92:d3:
20:e9:33:bc:52:99:af:32:b5:29:b3:25:2a:b4:48:
f9:72:e1:ca:64:f7:e6:82:10:8d:e8:9d:c2:8a:88:
fa:38:66:8a:fc:63:f9:01:f9:78:fd:7b:5c:77:fa:
76:87:fa:ec:df:b1:0e:79:95:57:b4:bd:26:ef:d6:
01:d1:eb:16:0a:bb:8e:0b:b5:c5:c5:8a:55:ab:d3:
ac:ea:91:4b:29:cc:19:a4:32:25:4e:2a:f1:65:44:
d0:02:ce:aa:ce:49:b4:ea:9f:7c:83:b0:40:7b:e7:
43:ab:a7:6c:a3:8f:7d:89:81:fa:4c:a5:ff:d5:8e:
c3:ce:4b:e0:b5:d8:b3:8e:45:cf:76:c0:ed:40:2b:
fd:53:0f:b0:a7:d5:3b:0d:b1:8a:a2:03:de:31:ad:
cc:77:ea:6f:7b:3e:d6:df:91:22:12:e6:be:fa:d8:
32:fc:10:63:14:51:72:de:5d:d6:16:93:bd:29:68:
33:ef:3a:66:ec:07:8a:26:df:13:d7:57:65:78:27:
de:5e:49:14:00:a2:00:7f:9a:a8:21:b6:a9:b1:95:
b0:a5:b9:0d:16:11:da:c7:6c:48:3c:40:e0:7e:0d:
5a:cd:56:3c:d1:97:05:b9:cb:4b:ed:39:4b:9c:c4:
3f:d2:55:13:6e:24:b0:d6:71:fa:f4:c1:ba:cc:ed:
1b:f5:fe:81:41:d8:00:98:3d:3a:c8:ae:7a:98:37:
18:05:95
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Key Usage: critical
Digital Signature, Certificate Sign, CRL Sign
X509v3 Basic Constraints: critical
CA:TRUE
X509v3 Subject Key Identifier:
E4:AF:2B:26:71:1A:2B:48:27:85:2F:52:66:2C:EF:F0:89:13:71:3E
Signature Algorithm: sha384WithRSAEncryption
Signature Value:
9f:aa:42:26:db:0b:9b:be:ff:1e:96:92:2e:3e:a2:65:4a:6a:
98:ba:22:cb:7d:c1:3a:d8:82:0a:06:c6:f6:a5:de:c0:4e:87:
66:79:a1:f9:a6:58:9c:aa:f9:b5:e6:60:e7:e0:e8:b1:1e:42:
41:33:0b:37:3d:ce:89:70:15:ca:b5:24:a8:cf:6b:b5:d2:40:
21:98:cf:22:34:cf:3b:c5:22:84:e0:c5:0e:8a:7c:5d:88:e4:
35:24:ce:9b:3e:1a:54:1e:6e:db:b2:87:a7:fc:f3:fa:81:55:
14:62:0a:59:a9:22:05:31:3e:82:d6:ee:db:57:34:bc:33:95:
d3:17:1b:e8:27:a2:8b:7b:4e:26:1a:7a:5a:64:b6:d1:ac:37:
f1:fd:a0:f3:38:ec:72:f0:11:75:9d:cb:34:52:8d:e6:76:6b:
17:c6:df:86:ab:27:8e:49:2b:75:66:81:10:21:a6:ea:3e:f4:
ae:25:ff:7c:15:de:ce:8c:25:3f:ca:62:70:0a:f7:2f:09:66:
07:c8:3f:1c:fc:f0:db:45:30:df:62:88:c1:b5:0f:9d:c3:9f:
4a:de:59:59:47:c5:87:22:36:e6:82:a7:ed:0a:b9:e2:07:a0:
8d:7b:7a:4a:3c:71:d2:e2:03:a1:1f:32:07:dd:1b:e4:42:ce:
0c:00:45:61:80:b5:0b:20:59:29:78:bd:f9:55:cb:63:c5:3c:
4c:f4:b6:ff:db:6a:5f:31:6b:99:9e:2c:c1:6b:50:a4:d7:e6:
18:14:bd:85:3f:67:ab:46:9f:a0:ff:42:a7:3a:7f:5c:cb:5d:
b0:70:1d:2b:34:f5:d4:76:09:0c:eb:78:4c:59:05:f3:33:42:
c3:61:15:10:1b:77:4d:ce:22:8c:d4:85:f2:45:7d:b7:53:ea:
ef:40:5a:94:0a:5c:20:5f:4e:40:5d:62:22:76:df:ff:ce:61:
bd:8c:23:78:d2:37:02:e0:8e:de:d1:11:37:89:f6:bf:ed:49:
07:62:ae:92:ec:40:1a:af:14:09:d9:d0:4e:b2:a2:f7:be:ee:
ee:d8:ff:dc:1a:2d:de:b8:36:71:e2:fc:79:b7:94:25:d1:48:
73:5b:a1:35:e7:b3:99:67:75:c1:19:3a:2b:47:4e:d3:42:8e:
fd:31:c8:16:66:da:d2:0c:3c:db:b3:8e:c9:a1:0d:80:0f:7b:
16:77:14:bf:ff:db:09:94:b2:93:bc:20:58:15:e9:db:71:43:
f3:de:10:c3:00:dc:a8:2a:95:b6:c2:d6:3f:90:6b:76:db:6c:
fe:8c:bc:f2:70:35:0c:dc:99:19:35:dc:d7:c8:46:63:d5:36:
71:ae:57:fb:b7:82:6d:dc
-----BEGIN CERTIFICATE-----
MIIFVzCCAz+gAwIBAgINAgPlk28xsBNJiGuiFzANBgkqhkiG9w0BAQwFADBHMQsw
CQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEU
MBIGA1UEAxMLR1RTIFJvb3QgUjEwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAw
MDAwWjBHMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZp
Y2VzIExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjEwggIiMA0GCSqGSIb3DQEBAQUA
A4ICDwAwggIKAoICAQC2EQKLHuOhd5s73L+UPreVp0A8of2C+X0yBoJx9vaMf/vo
27xqLpeXo4xL+Sv2sfnOhB2x+cWX3u+58qPpvBKJXqeqUqv4IyfLpLGcY9vXmX7w
Cl7raKb0xlpHDU0QM+NOsROjyBhsS+z8CZDfnWQpJSMHobTSPS5g4M/SCYe7zUjw
TcLCeoiKu7rPWRnWr4+wB7CeMfGCwcDfLqZtbBkOtdh+JhpFAz2weaSUKK0Pfybl
qAj+lug8aJRT7oM6iCsVlgmy4HqMLnXWnOunVmSPlk9orj2XwoSPwLxAwAtcvfaH
szVsrBhQf4TgTM2S0yDpM7xSma8ytSmzJSq0SPly4cpk9+aCEI3oncKKiPo4Zor8
Y/kB+Xj9e1x3+naH+uzfsQ55lVe0vSbv1gHR6xYKu44LtcXFilWr06zqkUspzBmk
MiVOKvFlRNACzqrOSbTqn3yDsEB750Orp2yjj32JgfpMpf/VjsPOS+C12LOORc92
wO1AK/1TD7Cn1TsNsYqiA94xrcx36m97PtbfkSIS5r762DL8EGMUUXLeXdYWk70p
aDPvOmbsB4om3xPXV2V4J95eSRQAogB/mqghtqmxlbCluQ0WEdrHbEg8QOB+DVrN
VjzRlwW5y0vtOUucxD/SVRNuJLDWcfr0wbrM7Rv1/oFB2ACYPTrIrnqYNxgFlQID
AQABo0IwQDAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E
FgQU5K8rJnEaK0gnhS9SZizv8IkTcT4wDQYJKoZIhvcNAQEMBQADggIBAJ+qQibb
C5u+/x6Wki4+omVKapi6Ist9wTrYggoGxval3sBOh2Z5ofmmWJyq+bXmYOfg6LEe
QkEzCzc9zolwFcq1JKjPa7XSQCGYzyI0zzvFIoTgxQ6KfF2I5DUkzps+GlQebtuy
h6f88/qBVRRiClmpIgUxPoLW7ttXNLwzldMXG+gnoot7TiYaelpkttGsN/H9oPM4
7HLwEXWdyzRSjeZ2axfG34arJ45JK3VmgRAhpuo+9K4l/3wV3s6MJT/KYnAK9y8J
ZgfIPxz88NtFMN9iiMG1D53Dn0reWVlHxYciNuaCp+0KueIHoI17eko8cdLiA6Ef
MgfdG+RCzgwARWGAtQsgWSl4vflVy2PFPEz0tv/bal8xa5meLMFrUKTX5hgUvYU/
Z6tGn6D/Qqc6f1zLXbBwHSs09dR2CQzreExZBfMzQsNhFRAbd03OIozUhfJFfbdT
6u9AWpQKXCBfTkBdYiJ23//OYb2MI3jSNwLgjt7RETeJ9r/tSQdirpLsQBqvFAnZ
0E6yove+7u7Y/9waLd64NnHi/Hm3lCXRSHNboTXns5lndcEZOitHTtNCjv0xyBZm
2tIMPNuzjsmhDYAPexZ3FL//2wmUspO8IFgV6dtxQ/PeEMMA3KgqlbbC1j+Qa3bb
bP6MvPJwNQzcmRk13NfIRmPVNnGuV/u3gm3c
-----END CERTIFICATE-----

View file

@ -1,12 +1,12 @@
#!rsc by RouterOS
# RouterOS script: check-certificates
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# check for certificate validity
# https://git.eworm.de/cgit/routeros-scripts/about/doc/check-certificates.md
:local 0 "check-certificates";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
@ -75,25 +75,47 @@
}
:local FormatInfo do={
:local CertVal $1;
:local Cert $1;
:global FormatLine;
:global FormatMultiLines;
:global IfThenElse;
:global ParseKeyValueStore;
:local FormatExpire do={
:global CharacterReplace;
:return [ $CharacterReplace [ $CharacterReplace [ :tostr $1 ] "w" "w " ] "d" "d " ];
}
:local FormatCertChain do={
:local Cert $1;
:global EitherOr;
:global ParseKeyValueStore;
:local CertVal [ /certificate/get $Cert ];
:local Return "";
:for I from=0 to=5 do={
:set Return ($Return . [ $EitherOr ([ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN") \
([ $ParseKeyValueStore (($CertVal->"issuer")->0) ]->"CN") ]);
:set CertVal [ /certificate/get [ find where skid=($CertVal->"akid") ] ];
:if (($CertVal->"akid") = "" || ($CertVal->"akid") = ($CertVal->"skid")) do={
:return $Return;
}
:set Return ($Return . " -> ");
}
:return ($Return . "...");
}
:local CertVal [ /certificate/get $Cert ];
:return ( \
[ $FormatLine "Name" ($CertVal->"name") ] . "\n" . \
[ $IfThenElse ([ :len ($CertVal->"common-name") ] > 0) ([ $FormatLine "CommonName" ($CertVal->"common-name") ] . "\n") ] . \
[ $IfThenElse ([ :len ($CertVal->"subject-alt-name") ] > 0) ([ $FormatMultiLines "SubjectAltNames" ($CertVal->"subject-alt-name") ] . "\n") ] . \
[ $FormatLine "Private key" [ $IfThenElse (($CertVal->"private-key") = true) "available" "missing" ] ] . "\n" . \
[ $FormatLine "Fingerprint" ($CertVal->"fingerprint") ] . "\n" . \
[ $FormatLine "Issuer" ($CertVal->"ca" . ([ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN")) ] . "\n" . \
[ $IfThenElse ([ :len ($CertVal->"ca") ] > 0) [ $FormatLine "Issuer" ($CertVal->"ca") ] [ $FormatLine "Issuer chain" [ $FormatCertChain $Cert ] ] ] . "\n" . \
"Validity:\n" . \
[ $FormatLine " from" ($CertVal->"invalid-before") ] . "\n" . \
[ $FormatLine " to" ($CertVal->"invalid-after") ] . "\n" . \
@ -105,6 +127,7 @@ $WaitFullyConnected;
:foreach Cert in=[ /certificate/find where !revoked !ca !scep-url expires-after<$CertRenewTime ] do={
:local CertVal [ /certificate/get $Cert ];
:local CertNew;
:local LastName;
:do {
@ -123,13 +146,13 @@ $WaitFullyConnected;
}
}
:if ($CertVal->"fingerprint" != [ /certificate/get $Cert fingerprint ]) do={
:if ([ :len ($CertVal->"fingerprint") ] > 0 && $CertVal->"fingerprint" != [ /certificate/get $Cert fingerprint ]) do={
$LogPrintExit2 debug $0 ("Certificate '" . $CertVal->"name" . "' was updated in place.") false;
:set CertVal [ /certificate/get $Cert ];
} else {
} else={
$LogPrintExit2 debug $0 ("Certificate '" . $CertVal->"name" . "' was not updated, but replaced.") false;
:local CertNew [ /certificate/find where name~("^" . [ $EscapeForRegEx [ $UrlEncode $LastName ] ] . "\\.(p12|pem)_[0-9]+\$") \
:set CertNew [ /certificate/find where name~("^" . [ $EscapeForRegEx [ $UrlEncode $LastName ] ] . "\\.(p12|pem)_[0-9]+\$") \
(common-name=($CertVal->"common-name") or subject-alt-name~("(^|\\W)(DNS|IP):" . [ $EscapeForRegEx $LastName ] . "(\\W|\$)")) \
fingerprint!=[ :tostr ($CertVal->"fingerprint") ] expires-after>$CertRenewTime ];
:local CertNewVal [ /certificate/get $CertNew ];
@ -153,12 +176,12 @@ $WaitFullyConnected;
/certificate/remove $Cert;
/certificate/set $CertNew name=($CertVal->"name");
:set CertNewVal;
:set CertVal [ /certificate/get $CertNew ];;
:set CertVal [ /certificate/get $CertNew ];
}
$SendNotification2 ({ origin=$0; silent=true; \
subject=([ $SymbolForNotification "lock-with-ink-pen" ] . "Certificate renewed: " . ($CertVal->"name")); \
message=("A certificate on " . $Identity . " has been renewed.\n\n" . [ $FormatInfo $CertVal ]) });
message=("A certificate on " . $Identity . " has been renewed.\n\n" . [ $FormatInfo $CertNew ]) });
$LogPrintExit2 info $0 ("The certificate " . ($CertVal->"name") . " has been renewed.") false;
} on-error={
$LogPrintExit2 debug $0 ("Could not renew certificate " . ($CertVal->"name") . ".") false;
@ -176,7 +199,7 @@ $WaitFullyConnected;
$SendNotification2 ({ origin=$0; \
subject=([ $SymbolForNotification "warning-sign" ] . "Certificate warning: " . ($CertVal->"name")); \
message=("A certificate on " . $Identity . " " . $State . ".\n\n" . [ $FormatInfo $CertVal ]) });
message=("A certificate on " . $Identity . " " . $State . ".\n\n" . [ $FormatInfo $Cert ]) });
$LogPrintExit2 info $0 ("The certificate " . ($CertVal->"name") . " " . $State . \
", it is invalid after " . ($CertVal->"invalid-after") . ".") false;
}

View file

@ -1,12 +1,12 @@
#!rsc by RouterOS
# RouterOS script: check-health
# Copyright (c) 2019-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2019-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# check for RouterOS health state
# https://git.eworm.de/cgit/routeros-scripts/about/doc/check-health.md
:local 0 "check-health";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,12 +1,12 @@
#!rsc by RouterOS
# RouterOS script: check-lte-firmware-upgrade
# Copyright (c) 2018-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# check for LTE firmware upgrade, send notification
# https://git.eworm.de/cgit/routeros-scripts/about/doc/check-lte-firmware-upgrade.md
:local 0 "check-lte-firmware-upgrade";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
@ -21,7 +21,8 @@ $ScriptLock $0;
}
:local CheckInterface do={
:local Interface $1;
:local ScriptName $1;
:local Interface $2;
:global Identity;
:global SentLteFirmwareUpgradeNotification;
@ -45,14 +46,19 @@ $ScriptLock $0;
:return false;
}
:if ([ :len ($Firmware->"latest") ] = 0) do={
$LogPrintExit2 info $0 ("An empty string is not a valid version.") false;
:return false;
}
:if (($Firmware->"installed") = ($Firmware->"latest")) do={
:if ([ $ScriptFromTerminal $0 ] = true) do={
:if ([ $ScriptFromTerminal $ScriptName ] = true) do={
$LogPrintExit2 info $0 ("No firmware upgrade available for LTE interface " . $IntName . ".") false;
}
:return true;
}
:if ([ $ScriptFromTerminal $0 ] = true && \
:if ([ $ScriptFromTerminal $ScriptName ] = true && \
[ :len [ /system/script/find where name="unattended-lte-firmware-upgrade" ] ] > 0) do={
:put ("Do you want to start unattended lte firmware upgrade for interface " . $IntName . "? [y/N]");
:if (([ /terminal/inkey timeout=60 ] % 32) = 25) do={
@ -84,5 +90,5 @@ $ScriptLock $0;
}
:foreach Interface in=[ /interface/lte/find ] do={
$CheckInterface $Interface;
$CheckInterface $0 $Interface;
}

View file

@ -1,12 +1,12 @@
#!rsc by RouterOS
# RouterOS script: check-routeros-update
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# check for RouterOS update, send notification and/or install
# https://git.eworm.de/cgit/routeros-scripts/about/doc/check-routeros-update.md
:local 0 "check-routeros-update";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
@ -41,7 +41,7 @@ $ScriptLock $0;
$WaitFullyConnected;
:if ([ :len [ /system/scheduler/find where name="\$RebootForUpdate" ] ] > 0) do={
:if ([ :len [ /system/scheduler/find where name="_RebootForUpdate" ] ] > 0) do={
:error "A reboot for update is already scheduled.";
}

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: collect-wireless-mac.capsman
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# provides: lease-script, order=40
@ -10,7 +10,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "collect-wireless-mac.capsman";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: collect-wireless-mac.local
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# provides: lease-script, order=40
@ -10,7 +10,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "collect-wireless-mac.local";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: collect-wireless-mac%TEMPL%
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# provides: lease-script, order=40
@ -11,7 +11,7 @@
# !! This is just a template to generate the real script!
# !! Pattern '%TEMPL%' is replaced, paths are filtered.
:local 0 "collect-wireless-mac%TEMPL%";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: collect-wireless-mac.wifi
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# provides: lease-script, order=40
@ -10,7 +10,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "collect-wireless-mac.wifi";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: collect-wireless-mac.wifiwave2
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# provides: lease-script, order=40
@ -10,7 +10,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "collect-wireless-mac.wifiwave2";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: daily-psk.capsman
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
@ -9,7 +9,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "daily-psk.capsman";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: daily-psk.local
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
@ -9,7 +9,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "daily-psk.local";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: daily-psk%TEMPL%
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
@ -10,7 +10,7 @@
# !! This is just a template to generate the real script!
# !! Pattern '%TEMPL%' is replaced, paths are filtered.
:local 0 "daily-psk%TEMPL%";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: daily-psk.wifi
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
@ -9,7 +9,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "daily-psk.wifi";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: daily-psk.wifiwave2
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
@ -9,7 +9,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "daily-psk.wifiwave2";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: dhcp-lease-comment.capsman
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# provides: lease-script, order=60
@ -10,7 +10,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "dhcp-lease-comment.capsman";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: dhcp-lease-comment.local
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# provides: lease-script, order=60
@ -10,7 +10,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "dhcp-lease-comment.local";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: dhcp-lease-comment%TEMPL%
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# provides: lease-script, order=60
@ -11,7 +11,7 @@
# !! This is just a template to generate the real script!
# !! Pattern '%TEMPL%' is replaced, paths are filtered.
:local 0 "dhcp-lease-comment%TEMPL%";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: dhcp-lease-comment.wifi
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# provides: lease-script, order=60
@ -10,7 +10,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "dhcp-lease-comment.wifi";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: dhcp-lease-comment.wifiwave2
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# provides: lease-script, order=60
@ -10,7 +10,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "dhcp-lease-comment.wifiwave2";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: dhcp-to-dns
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# provides: lease-script, order=20
@ -8,7 +8,7 @@
# check DHCP leases and add/remove/update DNS entries
# https://git.eworm.de/cgit/routeros-scripts/about/doc/dhcp-to-dns.md
:local 0 "dhcp-to-dns";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -18,7 +18,11 @@ This script automatically downloads these packages.
Requirements and installation
-----------------------------
Just install the script on CAPsMAN device.
Make sure you have the `package-path` set in your CAPsMAN configuration,
as that is where packages are downloaded to and where the system expects
them.
Then just install the script on CAPsMAN device.
Depending on whether you use `wifi` package (`/interface/wifi`), `wifiwave2`
package (`/interface/wifiwave2`) or legacy wifi with CAPsMAN (`/caps-man`)
you need to install a different script.
@ -51,12 +55,11 @@ For legacy CAPsMAN:
Packages available in local storage in older version are downloaded
unconditionally.
If no packages are found the script tries to download missing packages for
legacy CAPsMAN by guessing from system log. For `wifi` and `wifiwave2` a
default set of packages is downloaded.
If no packages are found the script downloads a default set of packages:
* `wifi`: `routeros`, `wifi-qcom` and `wifi-qcom-ac` for *arm* and *arm64*
* `wifi`: `routeros` and `wifi-qcom` for *arm* and *arm64*, `wifi-qcom-ac` for *arm*
* `wifiwave2`: `routeros` and `wifiwave2` for *arm* and *arm64*
* legacy CAPsMAN: `routeros` and `wireless` for *arm* and *mipsbe*
> **Info**: If you have packages in the directory and things go wrong for
> what ever unknown reason: Remove **all** packages and start over.

View file

@ -52,7 +52,7 @@ Configuration
The configuration goes to `global-config-overlay`, these are the parameters:
* `ModeButton`: an array with defined actions
* `ModeButtonLED`: led to give visual feedback
* `ModeButtonLED`: led to give visual feedback, `type` must be `on` or `off`
> **Info**: Copy relevant configuration from
> [`global-config`](../global-config.rsc) (the one without `-overlay`) to

View file

@ -43,6 +43,15 @@ Giving a specific query url for DoH is possible:
Note that using a name in DoH url may introduce a chicken-and-egg issue!
Adding a static DNS record has the same result for the url, but always
resolves to the same address.
/ip/dns/static/add name="dns.nextdns.io" address=199.247.16.158;
/tool/netwatch/add comment="doh" host=199.247.16.158;
Be aware that you have to keep the ip address in sync with real world
manually!
Importing a certificate automatically is possible, at least if available in
the repository (see `certs` sub directory).

View file

@ -1,12 +1,12 @@
#!rsc by RouterOS
# RouterOS script: firmware-upgrade-reboot
# Copyright (c) 2022-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2022-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# install firmware upgrade, and reboot
# https://git.eworm.de/cgit/routeros-scripts/about/doc/firmware-upgrade-reboot.md
:local 0 "firmware-upgrade-reboot";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,12 +1,12 @@
#!rsc by RouterOS
# RouterOS script: fw-addr-lists
# Copyright (c) 2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2023-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# download, import and update firewall address-lists
# https://git.eworm.de/cgit/routeros-scripts/about/doc/fw-addr-lists.md
:local 0 "fw-addr-lists";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
@ -14,7 +14,9 @@
:global FwAddrListTimeOut;
:global CertificateAvailable;
:global EitherOr;
:global LogPrintExit2;
:global LogPrintOnce;
:global ScriptLock;
:global WaitFullyConnected;
@ -42,6 +44,7 @@ $WaitFullyConnected;
:foreach List in=$FwList do={
:local CheckCertificate "no";
:local Data false;
:local TimeOut [ $EitherOr [ :totime ($List->"timeout") ] $FwAddrListTimeOut ];
:if ([ :len ($List->"cert") ] > 0) do={
:set CheckCertificate "yes-without-crl";
@ -70,12 +73,16 @@ $WaitFullyConnected;
$LogPrintExit2 warning $0 ("Failed downloading list from: " . $List->"url") false;
}
:if ([ :len $Data ] > 63000) do={
$LogPrintOnce warning $0 ("The list is huge and may be truncated: " . $List->"url");
}
:while ([ :len $Data ] != 0) do={
:local Line [ :pick $Data 0 [ :find $Data "\n" ] ];
:local Address ([ :pick $Line 0 [ $FindDelim $Line ] ] . ($List->"cidr"));
:if ($Address ~ "^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}(/[0-9]{1,2})?\$" || \
$Address ~ "^[\\.a-zA-Z0-9-]+\\.[a-zA-Z]{2,}\$") do={
:set ($Addresses->$Address) 1;
:set ($Addresses->$Address) $TimeOut;
}
:set Data [ :pick $Data ([ :len $Line ] + 1) [ :len $Data ] ];
}
@ -83,9 +90,9 @@ $WaitFullyConnected;
:foreach Entry in=[ /ip/firewall/address-list/find where list=$FwListName comment=$ListComment ] do={
:local Address [ /ip/firewall/address-list/get $Entry address ];
:if (($Addresses->$Address) = 1) do={
$LogPrintExit2 debug $0 ("Renewing: " . $Address) false;
/ip/firewall/address-list/set $Entry timeout=$FwAddrListTimeOut;
:if ([ :typeof ($Addresses->$Address) ] = "time") do={
$LogPrintExit2 debug $0 ("Renewing for " . ($Addresses->$Address) . ": " . $Address) false;
/ip/firewall/address-list/set $Entry timeout=($Addresses->$Address);
:set ($Addresses->$Address);
:set CntRenew ($CntRenew + 1);
} else={
@ -98,9 +105,9 @@ $WaitFullyConnected;
}
:foreach Address,Ignore in=$Addresses do={
$LogPrintExit2 debug $0 ("Adding: " . $Address) false;
$LogPrintExit2 debug $0 ("Adding for " . ($Addresses->$Address) . ": " . $Address) false;
:do {
/ip/firewall/address-list/add list=$FwListName comment=$ListComment address=$Address timeout=$FwAddrListTimeOut;
/ip/firewall/address-list/add list=$FwListName comment=$ListComment address=$Address timeout=($Addresses->$Address);
:set ($Addresses->$Address);
:set CntAdd ($CntAdd + 1);
} on-error={

View file

@ -1,5 +1,5 @@
# Overlay for global configuration by RouterOS Scripts
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# global configuration, custom overlay

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: global-config
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# global configuration
@ -88,7 +88,7 @@
:global FwAddrLists {
# "allow"={
# { url="https://eworm.de/ros/fw-addr-lists/allow";
# cert="E1" };
# cert="E1"; timeout=1w };
# };
"block"={
# { url="https://eworm.de/ros/fw-addr-lists/block";

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: global-functions
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
@ -9,10 +9,10 @@
# global functions
# https://git.eworm.de/cgit/routeros-scripts/about/
:local 0 "global-functions";
:local 0 [ :jobname ];
# expected configuration version
:global ExpectedConfigVersion 114;
:global ExpectedConfigVersion 116;
# global variables not to be changed by user
:global GlobalFunctionsReady false;
@ -20,9 +20,11 @@
:global Identity [ /system/identity/get name ];
# global functions
:global AlignRight;
:global CertificateAvailable;
:global CertificateDownload;
:global CertificateNameByCN;
:global CharacterMultiply;
:global CharacterReplace;
:global CleanFilePath;
:global DeviceInfo;
@ -47,6 +49,8 @@
:global IsTimeSync;
:global LogPrintExit2;
:global LogPrintOnce;
:global MAX;
:global MIN;
:global MkDir;
:global NotificationFunctions;
:global ParseDate;
@ -72,6 +76,20 @@
:global WaitFullyConnected;
:global WaitTimeSync;
# align string to the right
:global AlignRight do={
:local Input [ :tostr $1 ];
:local Len [ :tonum $2 ];
:global CharacterMultiply;
:global EitherOr;
:set Len [ $EitherOr $Len 8 ];
:local Spaces [ $CharacterMultiply " " $Len ];
:return ([ :pick $Spaces 0 ($Len - [ :len $Input ]) ] . $Input);
}
# check and download required certificate
:set CertificateAvailable do={
:local CommonName [ :tostr $1 ];
@ -131,6 +149,7 @@
dst-path=$LocalFileName as-value;
$WaitForFile $LocalFileName;
/certificate/import file-name=$LocalFileName passphrase="" as-value;
:delay 1s;
/file/remove $LocalFileName;
:foreach Cert in=[ /certificate/find where name~("^" . $LocalFileName . "_[0-9]+\$") ] do={
@ -141,7 +160,6 @@
"CommonName \"" . $CommonName . "\"!") false;
:return false;
}
:delay 1s;
:return true;
}
@ -156,6 +174,15 @@
name=[ $CharacterReplace [ $CharacterReplace [ $CharacterReplace $CommonName "'" "-" ] " " "-" ] "---" "-" ];
}
# multiply given character(s)
:set CharacterMultiply do={
:local Return "";
:for I from=1 to=$2 do={
:set Return ($Return . $1);
}
:return $Return;
}
# character replace
:set CharacterReplace do={
:local String [ :tostr $1 ];
@ -203,16 +230,21 @@
:global IfThenElse;
:global FormatLine;
:local License [ /system/license/get ];
:local Resource [ /system/resource/get ];
:local RouterBoard;
:do {
:set RouterBoard [[ :parse "/system/routerboard/get" ]];
} on-error={ }
:local License [ /system/license/get ];
:local Snmp [ /snmp/get ];
:local Update [ /system/package/update/get ];
:return ( \
[ $FormatLine "Hostname" $Identity ] . "\n" . \
[ $IfThenElse ([ :len ($Snmp->"location") ] > 0) \
([ $FormatLine "Location" ($Snmp->"location") ] . "\n") ] . \
[ $IfThenElse ([ :len ($Snmp->"contact") ] > 0) \
([ $FormatLine "Contact" ($Snmp->"contact") ] . "\n") ] . \
[ $FormatLine "Board name" ($Resource->"board-name") ] . "\n" . \
[ $FormatLine "Architecture" ($Resource->"architecture-name") ] . "\n" . \
[ $IfThenElse ($RouterBoard->"routerboard" = true) \
@ -345,12 +377,14 @@
:local Key [ :tostr $1 ];
:local Value [ :tostr $2 ];
:local Indent [ :tonum $3 ];
:local Spaces " ";
:local Spaces;
:local Return "";
:global CharacterMultiply;
:global EitherOr;
:set Indent [ $EitherOr $Indent 16 ];
:local Spaces [ $CharacterMultiply " " $Indent ];
:if ([ :len $Key ] > 0) do={ :set Return ($Key . ":"); }
:if ([ :len $Key ] > ($Indent - 2)) do={
@ -392,7 +426,7 @@
}
:do {
:if ([ $CertificateAvailable "R3" ] = false) do={
:if ([ $CertificateAvailable "GTS CA 1P5" ] = false) do={
$LogPrintExit2 warning $0 ("Downloading required certificate failed.") true;
}
:local Vendor ([ /tool/fetch check-certificate=yes-without-crl \
@ -666,6 +700,18 @@
$LogPrintExit2 $Severity $Name $Message false;
}
# get max value
:set MAX do={
:if ($1 > $2) do={ :return $1; }
:return $2;
}
# get min value
:set MIN do={
:if ($1 < $2) do={ :return $1; }
:return $2;
}
# create directory
:set MkDir do={
:local Path [ :tostr $1 ];
@ -1070,7 +1116,7 @@
:for I from=($ExpectedConfigVersionBefore + 1) to=$ExpectedConfigVersion do={
:local Change ($GlobalConfigChanges->[ :tostr $I ]);
:set NotificationMessage ($NotificationMessage . "\n " . \
[ $SymbolForNotification "pushpin" "* " ] . $Change);
[ $SymbolForNotification "pushpin" "*" ] . $Change);
$LogPrintExit2 info $0 ("Change " . $I . ": " . $Change) false;
}
} else={
@ -1251,6 +1297,8 @@
:local Symbols {
"abacus"="\F0\9F\A7\AE";
"alarm-clock"="\E2\8F\B0";
"arrow-down"="\E2\AC\87";
"arrow-up"="\E2\AC\86";
"calendar"="\F0\9F\93\85";
"card-file-box"="\F0\9F\97\83";
"chart-decreasing"="\F0\9F\93\89";
@ -1260,6 +1308,7 @@
"earth"="\F0\9F\8C\8D";
"fire"="\F0\9F\94\A5";
"floppy-disk"="\F0\9F\92\BE";
"heart"="\E2\99\A5";
"high-voltage-sign"="\E2\9A\A1";
"incoming-envelope"="\F0\9F\93\A8";
"information"="\E2\84\B9";
@ -1273,7 +1322,7 @@
"scissors"="\E2\9C\82";
"sparkles"="\E2\9C\A8";
"speech-balloon"="\F0\9F\92\AC";
"up-arrow"="\E2\AC\86";
"star"="\E2\AD\90";
"warning-sign"="\E2\9A\A0";
"white-heavy-check-mark"="\E2\9C\85"
}
@ -1285,9 +1334,10 @@
:set SymbolForNotification do={
:global NotificationsWithSymbols;
:global SymbolByUnicodeName;
:global IfThenElse;
:if ($NotificationsWithSymbols != true) do={
:return [ :tostr $2 ];
:return [ $IfThenElse ([ :len $2 ] > 0) ([ :tostr $2 ] . " ") "" ];
}
:local Return "";
:foreach Symbol in=[ :toarray $1 ] do={

View file

@ -1,11 +1,11 @@
#!rsc by RouterOS
# RouterOS script: global-wait
# Copyright (c) 2020-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2020-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# wait for global-functions to finish
# https://git.eworm.de/cgit/routeros-scripts/about/doc/global-wait.md
:local 0 "global-wait";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,12 +1,12 @@
#!rsc by RouterOS
# RouterOS script: gps-track
# Copyright (c) 2018-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# track gps data by sending json data to http server
# https://git.eworm.de/cgit/routeros-scripts/about/doc/gps-track.md
:local 0 "gps-track";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: hotspot-to-wpa-cleanup.capsman
# Copyright (c) 2021-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2021-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# provides: lease-script, order=80
@ -10,7 +10,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "hotspot-to-wpa-cleanup.capsman";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: hotspot-to-wpa-cleanup%TEMPL%
# Copyright (c) 2021-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2021-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# provides: lease-script, order=80
@ -14,7 +14,7 @@
# !! This is just a template to generate the real script!
# !! Pattern '%TEMPL%' is replaced, paths are filtered.
:local 0 "hotspot-to-wpa-cleanup%TEMPL%";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: hotspot-to-wpa-cleanup.wifi
# Copyright (c) 2021-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2021-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# provides: lease-script, order=80
@ -11,7 +11,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "hotspot-to-wpa-cleanup.wifi";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: hotspot-to-wpa-cleanup.wifiwave2
# Copyright (c) 2021-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2021-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# provides: lease-script, order=80
@ -11,7 +11,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "hotspot-to-wpa-cleanup.wifiwave2";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: hotspot-to-wpa.capsman
# Copyright (c) 2019-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2019-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# add private WPA passphrase after hotspot login
@ -8,7 +8,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "hotspot-to-wpa.capsman";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: hotspot-to-wpa%TEMPL%
# Copyright (c) 2019-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2019-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# add private WPA passphrase after hotspot login
@ -9,7 +9,7 @@
# !! This is just a template to generate the real script!
# !! Pattern '%TEMPL%' is replaced, paths are filtered.
:local 0 "hotspot-to-wpa%TEMPL%";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: hotspot-to-wpa.wifi
# Copyright (c) 2019-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2019-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# add private WPA passphrase after hotspot login
@ -8,7 +8,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "hotspot-to-wpa.wifi";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: hotspot-to-wpa.wifiwave2
# Copyright (c) 2019-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2019-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# add private WPA passphrase after hotspot login
@ -8,7 +8,7 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 "hotspot-to-wpa.wifiwave2";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: ip-addr-bridge
# Copyright (c) 2018-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# enable or disable ip addresses based on bridge port state

View file

@ -1,12 +1,12 @@
#!rsc by RouterOS
# RouterOS script: ipsec-to-dns
# Copyright (c) 2021-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2021-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# and add/remove/update DNS entries from IPSec mode-config
# https://git.eworm.de/cgit/routeros-scripts/about/doc/ipsec-to-dns.md
:local 0 "ipsec-to-dns";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,12 +1,12 @@
#!rsc by RouterOS
# RouterOS script: ipv6-update
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# update firewall and dns settings on IPv6 prefix change
# https://git.eworm.de/cgit/routeros-scripts/about/doc/ipv6-update.md
:local 0 "ipv6-update";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,12 +1,12 @@
#!rsc by RouterOS
# RouterOS script: lease-script
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# run scripts on DHCP lease
# https://git.eworm.de/cgit/routeros-scripts/about/doc/lease-script.md
:local 0 "lease-script";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: leds-day-mode
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# enable LEDs

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: leds-night-mode
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# disable LEDs

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: leds-toggle-mode
# Copyright (c) 2018-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# toggle LEDs mode

View file

@ -1,12 +1,12 @@
#!rsc by RouterOS
# RouterOS script: log-forward
# Copyright (c) 2020-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2020-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# forward log messages via notification
# https://git.eworm.de/cgit/routeros-scripts/about/doc/log-forward.md
:local 0 "log-forward";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: mod/bridge-port-to
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# reset bridge ports to default bridge

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: mod/bridge-port-vlan
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# manage VLANs on bridge ports

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: mod/inspectvar
# Copyright (c) 2020-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2020-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# inspect variables

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: mod/ipcalc
# Copyright (c) 2020-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2020-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# ip address calculation

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: mod/notification-email
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# send notifications via e-mail
@ -131,6 +131,7 @@
:global EitherOr;
:global IfThenElse;
:global NotificationEMailSignature;
:global NotificationEMailSubject;
:local To [ $EitherOr ($EmailGeneralToOverride->($Notification->"origin")) $EmailGeneralTo ];
@ -144,7 +145,7 @@
:if ([ :typeof $EmailQueue ] = "nothing") do={
:set EmailQueue ({});
}
:local Signature [ /system/note/get note ];
:local Signature [ $EitherOr [ $NotificationEMailSignature ] [ /system/note/get note ] ];
:set ($EmailQueue->[ :len $EmailQueue ]) {
to=$To; cc=$Cc;
subject=[ $NotificationEMailSubject ($Notification->"subject") ];
@ -170,27 +171,28 @@
:global QuotedPrintable do={
:local Input [ :tostr $1 ];
:global CharacterMultiply;
:if ([ :len $Input ] = 0) do={
:return $Input;
}
:local Return "";
:local Chars ("\80\81\82\83\84\85\86\87\88\89\8A\8B\8C\8D\8E\8F\90\91\92\93\94\95\96\97" . \
"\98\99\9A\9B\9C\9D\9E\9F\A0\A1\A2\A3\A4\A5\A6\A7\A8\A9\AA\AB\AC\AD\AE\AF\B0\B1\B2\B3" . \
"\B4\B5\B6\B7\B8\B9\BA\BB\BC\BD\BE\BF\C0\C1\C2\C3\C4\C5\C6\C7\C8\C9\CA\CB\CC\CD\CE\CF" . \
"\D0\D1\D2\D3\D4\D5\D6\D7\D8\D9\DA\DB\DC\DD\DE\DF\E0\E1\E2\E3\E4\E5\E6\E7\E8\E9\EA\EB" . \
"\EC\ED\EE\EF\F0\F1\F2\F3\F4\F5\F6\F7\F8\F9\FA\FB\FC\FD\FE\FF");
:local Hex { "0"; "1"; "2"; "3"; "4"; "5"; "6"; "7"; "8"; "9"; "A"; "B"; "C"; "D"; "E"; "F" };
:local Chars ( \
"\00\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10\11\12\13\14\15\16\17\18\19\1A\1B\1C\1D\1E\1F" . \
[ $CharacterMultiply ("\00") 29 ] . "=\00?" . [ $CharacterMultiply ("\00") 63 ] . "\7F" . \
"\80\81\82\83\84\85\86\87\88\89\8A\8B\8C\8D\8E\8F\90\91\92\93\94\95\96\97\98\99\9A\9B\9C\9D\9E\9F" . \
"\A0\A1\A2\A3\A4\A5\A6\A7\A8\A9\AA\AB\AC\AD\AE\AF\B0\B1\B2\B3\B4\B5\B6\B7\B8\B9\BA\BB\BC\BD\BE\BF" . \
"\C0\C1\C2\C3\C4\C5\C6\C7\C8\C9\CA\CB\CC\CD\CE\CF\D0\D1\D2\D3\D4\D5\D6\D7\D8\D9\DA\DB\DC\DD\DE\DF" . \
"\E0\E1\E2\E3\E4\E5\E6\E7\E8\E9\EA\EB\EC\ED\EE\EF\F0\F1\F2\F3\F4\F5\F6\F7\F8\F9\FA\FB\FC\FD\FE\FF");
:local Hex "0123456789ABCDEF";
:for I from=0 to=([ :len $Input ] - 1) do={
:local Char [ :pick $Input $I ];
:local Replace [ :find $Chars $Char ];
:if ($Char = "=") do={
:set Char "=3D";
}
:if ([ :typeof $Replace ] = "num") do={
:set Char ("=" . ($Hex->($Replace / 16 + 8)) . ($Hex->($Replace % 16)));
:set Char ("=" . [ :pick $Hex ($Replace / 16)] . [ :pick $Hex ($Replace % 16) ]);
}
:set Return ($Return . $Char);
}

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: mod/notification-matrix
# Copyright (c) 2013-2023 Michael Gisbers <michael@gisbers.de>
# Copyright (c) 2013-2024 Michael Gisbers <michael@gisbers.de>
# Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: mod/notification-ntfy
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# send notifications via Ntfy (ntfy.sh)

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: mod/notification-telegram
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# send notifications via Telegram

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: mod/scriptrunonece
# Copyright (c) 2020-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2020-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# download script and run it once

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: mod/ssh-keys-import
# Copyright (c) 2020-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2020-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# requires RouterOS, version=7.12beta1
@ -85,7 +85,7 @@
:local Continue false;
:local Line [ :pick $Keys 0 [ :find $Keys "\n" ] ];
:set Keys [ :pick $Keys ([ :find $Keys "\n" ] + 1) [ :len $Keys ] ];
:local KeyVal [ :toarray [ $CharacterReplace $Key " " "," ] ];
:local KeyVal [ :toarray [ $CharacterReplace $Line " " "," ] ];
:if ($KeyVal->0 = "ssh-ed25519" || $KeyVal->0 = "ssh-rsa") do={
:do {
$SSHKeysImport $Line $User;

View file

@ -1,12 +1,12 @@
#!rsc by RouterOS
# RouterOS script: mode-button
# Copyright (c) 2018-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# act on multiple mode and reset button presses
# https://git.eworm.de/cgit/routeros-scripts/about/doc/mode-button.md
:local 0 "mode-button";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,12 +1,12 @@
#!rsc by RouterOS
# RouterOS script: netwatch-dns
# Copyright (c) 2022-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2022-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# monitor and manage dns/doh with netwatch
# https://git.eworm.de/cgit/routeros-scripts/about/doc/netwatch-dns.md
:local 0 "netwatch-dns";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
@ -64,10 +64,15 @@ $ScriptLock $0;
:foreach Host in=[ /tool/netwatch/find where comment~"\\bdoh\\b" status="up" ] do={
:local HostVal [ /tool/netwatch/get $Host ];
:local HostInfo [ $ParseKeyValueStore ($HostVal->"comment") ];
:local HostName [ /ip/dns/static/find where name address=($HostVal->"host") \
(!type or type="A" or type="AAAA") !disabled !dynamic ];
:if ([ :len $HostName ] > 0) do={
:set HostName [ /ip/dns/static/get ($HostName->0) name ];
}
:if ($HostInfo->"doh" = true && $HostInfo->"disabled" != true && $DohServer = "") do={
:set DohServer [ $EitherOr ($HostInfo->"doh-url") \
("https://" . $HostVal->"host" . "/dns-query") ];
("https://" . [ $EitherOr $HostName ($HostVal->"host") ] . "/dns-query") ];
:set DohCert ($HostInfo->"doh-cert");
}
}

View file

@ -1,12 +1,12 @@
#!rsc by RouterOS
# RouterOS script: netwatch-notify
# Copyright (c) 2020-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2020-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# monitor netwatch and send notifications
# https://git.eworm.de/cgit/routeros-scripts/about/doc/netwatch-notify.md
:local 0 "netwatch-notify";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,9 +1,12 @@
# News, changes and migration by RouterOS Scripts
# Copyright (c) 2019-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2019-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
:global IDonate;
:global IfThenElse;
:global RequiredRouterOS;
:global SymbolForNotification;
# News, changes and migration up to change 95:
# https://git.eworm.de/cgit/routeros-scripts/plain/global-config.changes?h=change-95
@ -29,6 +32,10 @@
112="Enhanced 'mod/ssh-keys-import' to record the fingerprint of keys.";
113="Added helper functions for easier setup to Matrix notification module.";
114="All relevant scripts were ported to new wifi package for RouterOS 7.13 and later. Migration is complex and thus not done automatically!";
115=("Celebrating " . [ $SymbolForNotification "sparkles,star" ] . "1.000 stars " . [ $SymbolForNotification "star,sparkles" ] . "on Github! Please continue starring...");
116=("... and also please keep in mind that it takes a huge amount of time maintaining these scripts. " . [ $IfThenElse ($IDonate != true) \
("Following the donation hint " . [ $SymbolForNotification "arrow-down" "below" ] . "to keep me motivated is much appreciated. Thanks!") \
("Looks like you did donate already. " . [ $SymbolForNotification "heart" "<3" ] . "Much appreciated, thanks!") ]);
};
# Migration steps to be applied on script updates

View file

@ -1,12 +1,12 @@
#!rsc by RouterOS
# RouterOS script: ospf-to-leds
# Copyright (c) 2020-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2020-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# visualize ospf instance state via leds
# https://git.eworm.de/cgit/routeros-scripts/about/doc/ospf-to-leds.md
:local 0 "ospf-to-leds";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,12 +1,12 @@
#!rsc by RouterOS
# RouterOS script: packages-update
# Copyright (c) 2019-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2019-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# download packages and reboot for installation
# https://git.eworm.de/cgit/routeros-scripts/about/doc/packages-update.md
:local 0 "packages-update";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
@ -33,6 +33,11 @@ $ScriptLock $0;
:local NumInstalled [ $VersionToNum ($Update->"installed-version") ];
:local NumLatest [ $VersionToNum ($Update->"latest-version") ];
:if ($NumInstalled < 0x070d0000 && $NumLatest > 0x070d0000) do={
$LogPrintExit2 error $0 ("Migration to wireless/wifi package in RouterOS " . \
($Update->"latest-version") . " is pending. Please update manually!") true;
}
:local DoDowngrade false;
:if ($NumInstalled > $NumLatest) do={
:if ([ $ScriptFromTerminal $0 ] = true) do={

View file

@ -1,12 +1,12 @@
#!rsc by RouterOS
# RouterOS script: ppp-on-up
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# run scripts on ppp up
# https://git.eworm.de/cgit/routeros-scripts/about/doc/ppp-on-up.md
:local 0 "ppp-on-up";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,12 +1,12 @@
#!rsc by RouterOS
# RouterOS script: sms-action
# Copyright (c) 2018-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# run action on received SMS
# https://git.eworm.de/cgit/routeros-scripts/about/doc/sms-action.md
:local 0 "sms-action";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,13 +1,13 @@
#!rsc by RouterOS
# RouterOS script: sms-forward
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# Anatoly Bubenkov <bubenkoff@gmail.com>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# forward SMS to e-mail
# https://git.eworm.de/cgit/routeros-scripts/about/doc/sms-forward.md
:local 0 "sms-forward";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: super-mario-theme
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# play Super Mario theme

View file

@ -1,12 +1,12 @@
#!rsc by RouterOS
# RouterOS script: telegram-chat
# Copyright (c) 2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2023-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# use Telegram to chat with your Router and send commands
# https://git.eworm.de/cgit/routeros-scripts/about/doc/telegram-chat.md
:local 0 "telegram-chat";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
@ -112,18 +112,18 @@ $WaitFullyConnected;
$MkDir "tmpfs/telegram-chat";
$LogPrintExit2 info $0 ("Running command from update " . $UpdateID . ": " . $Message->"text") false;
:execute script=(":do {\n" . $Message->"text" . "\n} on-error={ /file/add name=\"" . $File . ".failed\" };" . \
"/file/add name=\"" . $File . ".done\"") file=$File;
"/file/add name=\"" . $File . ".done\"") file=($File . "\00");
:if ([ $WaitForFile ($File . ".done") [ $EitherOr $TelegramChatRunTime 20s ] ] = false) do={
:set State "The command did not finish, still running in background.\n\n";
}
:if ([ :len [ /file/find where name=($File . ".failed") ] ] > 0) do={
:set State "The command failed with an error!\n\n";
}
:local Content [ /file/get ($File . ".txt") contents ];
:local Content [ /file/get $File contents ];
$SendTelegram2 ({ origin=$0; chatid=($Chat->"id"); silent=true; replyto=($Message->"message_id"); \
subject=([ $SymbolForNotification "speech-balloon" ] . "Telegram Chat"); \
message=("Command:\n" . $Message->"text" . "\n\n" . $State . [ $IfThenElse ([ :len $Content ] > 0) \
("Output:\n" . $Content) [ $IfThenElse ([ /file/get ($File . ".txt") size ] > 0) \
("Output:\n" . $Content) [ $IfThenElse ([ /file/get $File size ] > 0) \
("Output exceeds file read size.") ("No output.") ] ]) });
/file/remove "tmpfs/telegram-chat";
} else={

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: unattended-lte-firmware-upgrade
# Copyright (c) 2018-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# schedule unattended lte firmware upgrade

View file

@ -1,13 +1,13 @@
#!rsc by RouterOS
# RouterOS script: update-gre-address
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# update gre interface remote address with dynamic address from
# ipsec remote peer
# https://git.eworm.de/cgit/routeros-scripts/about/doc/update-gre-address.md
:local 0 "update-gre-address";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }

View file

@ -1,6 +1,6 @@
#!rsc by RouterOS
# RouterOS script: update-tunnelbroker
# Copyright (c) 2013-2023 Christian Hesse <mail@eworm.de>
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
@ -9,7 +9,7 @@
# update local address of tunnelbroker interface
# https://git.eworm.de/cgit/routeros-scripts/about/doc/update-tunnelbroker.md
:local 0 "update-tunnelbroker";
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }