Compare commits
No commits in common. "main" and "change-131" have entirely different histories.
main
...
change-131
|
|
@ -4,7 +4,7 @@ Installing from branches
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
@ -22,13 +22,13 @@ for testing.
|
||||||
|
|
||||||
To install a single script from `next` branch:
|
To install a single script from `next` branch:
|
||||||
|
|
||||||
$ScriptInstallUpdate script-name "base-url=https://rsc.eworm.de/next/";
|
$ScriptInstallUpdate script-name "url-suffix=?h=next";
|
||||||
|
|
||||||
## Switch existing script
|
## Switch existing script
|
||||||
|
|
||||||
Alternatively switch an existing script to update from `next` branch:
|
Alternatively switch an existing script to update from `next` branch:
|
||||||
|
|
||||||
/system/script/set comment="base-url=https://rsc.eworm.de/next/" script-name;
|
/system/script/set comment="url-suffix=?h=next" script-name;
|
||||||
$ScriptInstallUpdate;
|
$ScriptInstallUpdate;
|
||||||
|
|
||||||
## Switch installation
|
## Switch installation
|
||||||
|
|
@ -36,7 +36,7 @@ Alternatively switch an existing script to update from `next` branch:
|
||||||
Last but not least - to switch the complete installation to the `next`
|
Last but not least - to switch the complete installation to the `next`
|
||||||
branch edit `global-config-overlay` and add:
|
branch edit `global-config-overlay` and add:
|
||||||
|
|
||||||
:global ScriptUpdatesBaseUrl "https://rsc.eworm.de/next/";
|
:global ScriptUpdatesUrlSuffix "?h=next";
|
||||||
|
|
||||||
... then reload the configuration and update:
|
... then reload the configuration and update:
|
||||||
|
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
|
@ -1,82 +0,0 @@
|
||||||
Certificate name from browser
|
|
||||||
=============================
|
|
||||||
|
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
|
||||||
[](https://t.me/routeros_scripts)
|
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
|
||||||
|
|
||||||
[⬅️ Go back to main README](README.md)
|
|
||||||
|
|
||||||
All well known desktop, mobile and server operating systems come with a
|
|
||||||
certificate store that is populated with a set of well known and trusted
|
|
||||||
certificates, acting as *trust anchors*.
|
|
||||||
|
|
||||||
However RouterOS does not, still sometimes a specific certificate is
|
|
||||||
required to properly verify a chain of trust. One example is downloading
|
|
||||||
the scripts from this repository with `fetch` command, thus the very
|
|
||||||
first step of [installation](README.md#the-long-way-in-detail) is importing
|
|
||||||
the certificate.
|
|
||||||
|
|
||||||
The scripts can install additional certificates when required. This happens
|
|
||||||
from this repository if available, or from [mkcert.org](https://mkcert.org)
|
|
||||||
as a fallback.
|
|
||||||
|
|
||||||
Get the certificate's CommonName
|
|
||||||
--------------------------------
|
|
||||||
|
|
||||||
But how to determine what certificate may be required? Often easiest way
|
|
||||||
is to use a desktop browser to get that information. This demonstration uses
|
|
||||||
[Mozilla Firefox](https://www.mozilla.org/firefox/).
|
|
||||||
|
|
||||||
Let's assume we want to make sure the certificate for
|
|
||||||
[git.eworm.de](https://git.eworm.de/) is available. Open that page in the
|
|
||||||
browser, then click the *lock* icon in addressbar, followed by "*Connection
|
|
||||||
secure*".
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
The dialog will change, click "*More information*".
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
A new window opens, click the button "*View Certificate*". (That window
|
|
||||||
can be closed now.)
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
A new tab opens, showing information on the server certificate and its
|
|
||||||
chain of trust. The leftmost certificate is what we are interested in.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Now we know that "`ISRG Root X2`" is required, some scripts need just
|
|
||||||
that information.
|
|
||||||
|
|
||||||
Import a certificate by CommonName
|
|
||||||
----------------------------------
|
|
||||||
|
|
||||||
Running the function `$CertificateAvailable` with that name as parameter
|
|
||||||
makes sure the certificate is available in the device's store:
|
|
||||||
|
|
||||||
$CertificateAvailable "ISRG Root X2";
|
|
||||||
|
|
||||||
If the certificate is actually available already nothing happens, and there
|
|
||||||
is no output. Otherwise the certificate is downloaded and imported.
|
|
||||||
|
|
||||||
If importing a certificate with that exact name fails a warning is given
|
|
||||||
and nothing is actually imported.
|
|
||||||
|
|
||||||
See also
|
|
||||||
--------
|
|
||||||
|
|
||||||
* [Download, import and update firewall address-lists](doc/fw-addr-lists.md)
|
|
||||||
* [Manage DNS and DoH servers from netwatch](doc/netwatch-dns.md)
|
|
||||||
* [Send notifications via Matrix](doc/mod/notification-matrix.md)
|
|
||||||
* [Send notifications via Ntfy](doc/mod/notification-ntfy.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
[⬅️ Go back to main README](README.md)
|
|
||||||
[⬆️ Go back to top](#top)
|
|
||||||
|
|
@ -4,7 +4,7 @@ Past Contributions
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
@ -20,9 +20,7 @@ for details!
|
||||||
* [Anatoly Bubenkov](mailto:bubenkoff@gmail.com) (@bubenkoff)
|
* [Anatoly Bubenkov](mailto:bubenkoff@gmail.com) (@bubenkoff)
|
||||||
* [Ben Harris](mailto:mail@bharr.is) (@bharrisau)
|
* [Ben Harris](mailto:mail@bharr.is) (@bharrisau)
|
||||||
* [Daniel Ziegenberg](mailto:daniel@ziegenberg.at) (@ziegenberg)
|
* [Daniel Ziegenberg](mailto:daniel@ziegenberg.at) (@ziegenberg)
|
||||||
* [Ignacio Serrano](mailto:ignic@ignic.com) (@ignic)
|
|
||||||
* [Michael Gisbers](mailto:michael@gisbers.de) (@mgisbers)
|
* [Michael Gisbers](mailto:michael@gisbers.de) (@mgisbers)
|
||||||
* [Miquel Bonastre](mailto:mbonastre@yahoo.com) (@mbonastre)
|
|
||||||
* @netravnen
|
* @netravnen
|
||||||
* [netztrip](mailto:dave-tvg@netztrip.de) (@netztrip)
|
* [netztrip](mailto:dave-tvg@netztrip.de) (@netztrip)
|
||||||
* [Stefan Müller](mailto:stefan.mueller.83@gmail.com) (@PackElend)
|
* [Stefan Müller](mailto:stefan.mueller.83@gmail.com) (@PackElend)
|
||||||
|
|
@ -39,7 +37,6 @@ Add yourself to the list,
|
||||||
* Daniel Ziegenberg (@ziegenberg)
|
* Daniel Ziegenberg (@ziegenberg)
|
||||||
* Devin Dean (@dd2594gh)
|
* Devin Dean (@dd2594gh)
|
||||||
* Evaldo Gardenal
|
* Evaldo Gardenal
|
||||||
* Florian Estraviz
|
|
||||||
* Giorgio Bikos
|
* Giorgio Bikos
|
||||||
* Harold Schoemaker
|
* Harold Schoemaker
|
||||||
* Hugo BV
|
* Hugo BV
|
||||||
|
|
@ -50,7 +47,6 @@ Add yourself to the list,
|
||||||
* Marek Čábák
|
* Marek Čábák
|
||||||
* Oleksandr Yukhymchuk
|
* Oleksandr Yukhymchuk
|
||||||
* Peter Holtkamp
|
* Peter Holtkamp
|
||||||
* Peter Ponzel
|
|
||||||
* Reiner Vehrenkamp
|
* Reiner Vehrenkamp
|
||||||
* Richard Österreicher
|
* Richard Österreicher
|
||||||
* Simon Hitzemann
|
* Simon Hitzemann
|
||||||
|
|
|
||||||
63
DEBUG.md
|
|
@ -1,63 +0,0 @@
|
||||||
Debug output and logs
|
|
||||||
=====================
|
|
||||||
|
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
|
||||||
[](https://t.me/routeros_scripts)
|
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
|
||||||
|
|
||||||
[⬅️ Go back to main README](README.md)
|
|
||||||
|
|
||||||
Sometimes scripts do not behave as expected. In these cases debug output
|
|
||||||
or logs can help.
|
|
||||||
|
|
||||||
## Debug output
|
|
||||||
|
|
||||||
Run this command in a terminal:
|
|
||||||
|
|
||||||
:set PrintDebug true;
|
|
||||||
|
|
||||||
You will then see debug output when running the script from terminal.
|
|
||||||
|
|
||||||
To revert to default output run:
|
|
||||||
|
|
||||||
:set PrintDebug false;
|
|
||||||
|
|
||||||
### Debug output for specific script
|
|
||||||
|
|
||||||
Even having debug output for a specific script or function only (or a
|
|
||||||
set of) is possible. To enable debug output for `telegram-chat` run:
|
|
||||||
|
|
||||||
:set ($PrintDebugOverride->"telegram-chat") true;
|
|
||||||
|
|
||||||
## Debug logs
|
|
||||||
|
|
||||||
The debug info can go to system log. To make it show up in `memory` run:
|
|
||||||
|
|
||||||
/system/logging/add topics=script,debug action=memory;
|
|
||||||
|
|
||||||
Other actions (`disk`, `email`, `remote` or `support`) can be used as
|
|
||||||
well. I do not recommend using `echo` - use [debug output](#debug-output)
|
|
||||||
instead.
|
|
||||||
|
|
||||||
Disable or remote that setting to restore regular logging.
|
|
||||||
|
|
||||||
## Verbose output
|
|
||||||
|
|
||||||
Specific scripts can generate huge amount of output. These do use a function
|
|
||||||
`$LogPrintVerbose`, which is declared, but has no code, intentionally.
|
|
||||||
|
|
||||||
If you *really* want that output set the function to be the same as
|
|
||||||
`$LogPrint`:
|
|
||||||
|
|
||||||
:set LogPrintVerbose $LogPrint;
|
|
||||||
|
|
||||||
To revert that change just run:
|
|
||||||
|
|
||||||
:set LogPrintVerbose;
|
|
||||||
|
|
||||||
---
|
|
||||||
[⬅️ Go back to main README](README.md)
|
|
||||||
[⬆️ Go back to top](#top)
|
|
||||||
|
|
@ -4,7 +4,7 @@ Initial commands
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
@ -17,12 +17,13 @@ Initial commands
|
||||||
Run the complete base installation:
|
Run the complete base installation:
|
||||||
|
|
||||||
{
|
{
|
||||||
/tool/fetch "https://git.eworm.de/cgit/routeros-scripts/plain/certs/ISRG-Root-X2.pem" dst-path="isrg-root-x2.pem" as-value;
|
/tool/fetch "https://git.eworm.de/cgit/routeros-scripts/plain/certs/ISRG-Root-X2.pem" dst-path="ISRG-Root-X2.pem" as-value;
|
||||||
:delay 1s;
|
:delay 1s;
|
||||||
/certificate/import file-name="isrg-root-x2.pem" passphrase="";
|
/certificate/import file-name=ISRG-Root-X2.pem passphrase="";
|
||||||
:if ([ :len [ /certificate/find where fingerprint="69729b8e15a86efc177a57afb7171dfc64add28c2fca8cf1507e34453ccb1470" ] ] != 1) do={
|
:if ([ :len [ /certificate/find where fingerprint="69729b8e15a86efc177a57afb7171dfc64add28c2fca8cf1507e34453ccb1470" ] ] != 1) do={
|
||||||
:error "Something is wrong with your certificates!";
|
:error "Something is wrong with your certificates!";
|
||||||
};
|
};
|
||||||
|
/file/remove [ find where name="ISRG-Root-X2.pem" ];
|
||||||
:delay 1s;
|
:delay 1s;
|
||||||
/system/script/set name=("global-config-overlay-" . [ /system/clock/get date ] . "-" . [ /system/clock/get time ]) [ find where name="global-config-overlay" ];
|
/system/script/set name=("global-config-overlay-" . [ /system/clock/get date ] . "-" . [ /system/clock/get time ]) [ find where name="global-config-overlay" ];
|
||||||
:foreach Script in={ "global-config"; "global-config-overlay"; "global-functions" } do={
|
:foreach Script in={ "global-config"; "global-config-overlay"; "global-functions" } do={
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 8.7 KiB |
19
README.md
|
|
@ -4,7 +4,7 @@ RouterOS Scripts
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
@ -34,12 +34,6 @@ Specific scripts may require even newer RouterOS version.
|
||||||
> ℹ️ **Info**: The `main` branch is now RouterOS v7 only. If you are still
|
> ℹ️ **Info**: The `main` branch is now RouterOS v7 only. If you are still
|
||||||
> running RouterOS v6 switch to `routeros-v6` branch!
|
> running RouterOS v6 switch to `routeros-v6` branch!
|
||||||
|
|
||||||
Starting with RouterOS 7.17 the
|
|
||||||
[device-mode](https://help.mikrotik.com/docs/spaces/ROS/pages/93749258/Device-mode)
|
|
||||||
has been extended to give more fine-grained control over what features are
|
|
||||||
available. You need to enable `scheduler` and `fetch` at least, specific
|
|
||||||
scripts may require additional features.
|
|
||||||
|
|
||||||
### Hardware
|
### Hardware
|
||||||
|
|
||||||
RouterOS packages increase in size with each release. This becomes a
|
RouterOS packages increase in size with each release. This becomes a
|
||||||
|
|
@ -75,7 +69,7 @@ download the certificates. If you intend to download the scripts from a
|
||||||
different location (for example from github.com) install the corresponding
|
different location (for example from github.com) install the corresponding
|
||||||
certificate chain.
|
certificate chain.
|
||||||
|
|
||||||
/tool/fetch "https://git.eworm.de/cgit/routeros-scripts/plain/certs/ISRG-Root-X2.pem" dst-path="isrg-root-x2.pem";
|
/tool/fetch "https://git.eworm.de/cgit/routeros-scripts/plain/certs/ISRG-Root-X2.pem" dst-path="ISRG-Root-X2.pem";
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
@ -87,7 +81,7 @@ file to your MikroTik device.
|
||||||
|
|
||||||
Then we import the certificate.
|
Then we import the certificate.
|
||||||
|
|
||||||
/certificate/import file-name="isrg-root-x2.pem" passphrase="";
|
/certificate/import file-name=ISRG-Root-X2.pem passphrase="";
|
||||||
|
|
||||||
Do not worry that the command is not shown - that happens because it contains
|
Do not worry that the command is not shown - that happens because it contains
|
||||||
a sensitive property, the passphrase.
|
a sensitive property, the passphrase.
|
||||||
|
|
@ -96,10 +90,11 @@ a sensitive property, the passphrase.
|
||||||
|
|
||||||
For basic verification we rename the certificate and print it by
|
For basic verification we rename the certificate and print it by
|
||||||
fingerprint. Make sure exactly this one certificate ("*ISRG-Root-X2*")
|
fingerprint. Make sure exactly this one certificate ("*ISRG-Root-X2*")
|
||||||
is shown.
|
is shown. Also remove the left over file.
|
||||||
|
|
||||||
/certificate/set name="ISRG-Root-X2" [ find where common-name="ISRG Root X2" ];
|
/certificate/set name="ISRG-Root-X2" [ find where common-name="ISRG Root X2" ];
|
||||||
/certificate/print proplist=name,fingerprint where fingerprint="69729b8e15a86efc177a57afb7171dfc64add28c2fca8cf1507e34453ccb1470";
|
/certificate/print proplist=name,fingerprint where fingerprint="69729b8e15a86efc177a57afb7171dfc64add28c2fca8cf1507e34453ccb1470";
|
||||||
|
/file/remove [ find where name="ISRG-Root-X2.pem" ];
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
@ -160,7 +155,7 @@ This last step is required when ever you make changes to your configuration.
|
||||||
> ℹ️ **Info**: It is recommended to edit the configuration using the command
|
> ℹ️ **Info**: It is recommended to edit the configuration using the command
|
||||||
> line interface. If using Winbox on Windows OS, the line endings may be
|
> line interface. If using Winbox on Windows OS, the line endings may be
|
||||||
> missing. To fix this run:
|
> missing. To fix this run:
|
||||||
> `/system/script/set source=[ :tocrlf [ get global-config-overlay source ] ] global-config-overlay;`
|
> `/system/script/set source=[ $Unix2Dos [ get global-config-overlay source ] ] global-config-overlay;`
|
||||||
|
|
||||||
Updating scripts
|
Updating scripts
|
||||||
----------------
|
----------------
|
||||||
|
|
@ -370,7 +365,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
Upstream
|
Upstream
|
||||||
--------
|
--------
|
||||||
|
|
||||||
[](https://rsc.eworm.de/)
|

|
||||||
|
|
||||||
URL:
|
URL:
|
||||||
[GitHub.com](https://github.com/eworm-de/routeros-scripts#routeros-scripts)
|
[GitHub.com](https://github.com/eworm-de/routeros-scripts#routeros-scripts)
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,18 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: accesslist-duplicates.capsman
|
# RouterOS script: accesslist-duplicates.capsman
|
||||||
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# print duplicate antries in wireless access list
|
# print duplicate antries in wireless access list
|
||||||
# https://rsc.eworm.de/doc/accesslist-duplicates.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/accesslist-duplicates.md
|
||||||
#
|
#
|
||||||
# !! Do not edit this file, it is generated from template!
|
# !! Do not edit this file, it is generated from template!
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -32,6 +31,4 @@
|
||||||
}
|
}
|
||||||
:set ($Seen->$Mac) 1;
|
:set ($Seen->$Mac) 1;
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,18 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: accesslist-duplicates.local
|
# RouterOS script: accesslist-duplicates.local
|
||||||
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# print duplicate antries in wireless access list
|
# print duplicate antries in wireless access list
|
||||||
# https://rsc.eworm.de/doc/accesslist-duplicates.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/accesslist-duplicates.md
|
||||||
#
|
#
|
||||||
# !! Do not edit this file, it is generated from template!
|
# !! Do not edit this file, it is generated from template!
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -32,6 +31,4 @@
|
||||||
}
|
}
|
||||||
:set ($Seen->$Mac) 1;
|
:set ($Seen->$Mac) 1;
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: accesslist-duplicates%TEMPL%
|
# RouterOS script: accesslist-duplicates%TEMPL%
|
||||||
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# print duplicate antries in wireless access list
|
# print duplicate antries in wireless access list
|
||||||
# https://rsc.eworm.de/doc/accesslist-duplicates.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/accesslist-duplicates.md
|
||||||
#
|
#
|
||||||
# !! This is just a template to generate the real script!
|
# !! This is just a template to generate the real script!
|
||||||
# !! Pattern '%TEMPL%' is replaced, paths are filtered.
|
# !! Pattern '%TEMPL%' is replaced, paths are filtered.
|
||||||
|
|
@ -14,7 +14,6 @@
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -41,6 +40,4 @@
|
||||||
}
|
}
|
||||||
:set ($Seen->$Mac) 1;
|
:set ($Seen->$Mac) 1;
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,18 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: accesslist-duplicates.wifi
|
# RouterOS script: accesslist-duplicates.wifi
|
||||||
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# print duplicate antries in wireless access list
|
# print duplicate antries in wireless access list
|
||||||
# https://rsc.eworm.de/doc/accesslist-duplicates.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/accesslist-duplicates.md
|
||||||
#
|
#
|
||||||
# !! Do not edit this file, it is generated from template!
|
# !! Do not edit this file, it is generated from template!
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -32,6 +31,4 @@
|
||||||
}
|
}
|
||||||
:set ($Seen->$Mac) 1;
|
:set ($Seen->$Mac) 1;
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,17 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: backup-cloud
|
# RouterOS script: backup-cloud
|
||||||
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: backup-script, order=40
|
# provides: backup-script, order=40
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# upload backup to MikroTik cloud
|
# upload backup to MikroTik cloud
|
||||||
# https://rsc.eworm.de/doc/backup-cloud.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/backup-cloud.md
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -26,7 +25,6 @@
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
:global MkDir;
|
:global MkDir;
|
||||||
:global RandomDelay;
|
:global RandomDelay;
|
||||||
:global RmDir;
|
|
||||||
:global ScriptFromTerminal;
|
:global ScriptFromTerminal;
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
:global SendNotification2;
|
:global SendNotification2;
|
||||||
|
|
@ -36,17 +34,8 @@
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set PackagesUpdateBackupFailure true;
|
:set PackagesUpdateBackupFailure true;
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ :len [ /system/scheduler/find where name="running-from-backup-partition" ] ] > 0) do={
|
|
||||||
$LogPrint warning $ScriptName ("Running from backup partition, refusing to act.");
|
|
||||||
:set PackagesUpdateBackupFailure true;
|
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$WaitFullyConnected;
|
$WaitFullyConnected;
|
||||||
|
|
||||||
:if ([ $ScriptFromTerminal $ScriptName ] = false && $BackupRandomDelay > 0) do={
|
:if ([ $ScriptFromTerminal $ScriptName ] = false && $BackupRandomDelay > 0) do={
|
||||||
|
|
@ -55,7 +44,6 @@
|
||||||
|
|
||||||
:if ([ $MkDir ("tmpfs/backup-cloud") ] = false) do={
|
:if ([ $MkDir ("tmpfs/backup-cloud") ] = false) do={
|
||||||
$LogPrint error $ScriptName ("Failed creating directory!");
|
$LogPrint error $ScriptName ("Failed creating directory!");
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -98,7 +86,5 @@
|
||||||
$LogPrint error $ScriptName ("Failed uploading backup for " . $Identity . " to cloud!");
|
$LogPrint error $ScriptName ("Failed uploading backup for " . $Identity . " to cloud!");
|
||||||
:set PackagesUpdateBackupFailure true;
|
:set PackagesUpdateBackupFailure true;
|
||||||
}
|
}
|
||||||
$RmDir "tmpfs/backup-cloud";
|
/file/remove "tmpfs/backup-cloud";
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,17 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: backup-email
|
# RouterOS script: backup-email
|
||||||
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: backup-script, order=20
|
# provides: backup-script, order=20
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# create and email backup and config file
|
# create and email backup and config file
|
||||||
# https://rsc.eworm.de/doc/backup-email.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/backup-email.md
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -40,30 +39,19 @@
|
||||||
|
|
||||||
:if ([ :typeof $SendEMail2 ] = "nothing") do={
|
:if ([ :typeof $SendEMail2 ] = "nothing") do={
|
||||||
$LogPrint error $ScriptName ("The module for sending notifications via e-mail is not installed.");
|
$LogPrint error $ScriptName ("The module for sending notifications via e-mail is not installed.");
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ($BackupSendBinary != true && \
|
:if ($BackupSendBinary != true && \
|
||||||
$BackupSendExport != true) do={
|
$BackupSendExport != true) do={
|
||||||
$LogPrint error $ScriptName ("Configured to send neither backup nor config export.");
|
$LogPrint error $ScriptName ("Configured to send neither backup nor config export.");
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set PackagesUpdateBackupFailure true;
|
:set PackagesUpdateBackupFailure true;
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ :len [ /system/scheduler/find where name="running-from-backup-partition" ] ] > 0) do={
|
|
||||||
$LogPrint warning $ScriptName ("Running from backup partition, refusing to act.");
|
|
||||||
:set PackagesUpdateBackupFailure true;
|
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$WaitFullyConnected;
|
$WaitFullyConnected;
|
||||||
|
|
||||||
:if ([ $ScriptFromTerminal $ScriptName ] = false && $BackupRandomDelay > 0) do={
|
:if ([ $ScriptFromTerminal $ScriptName ] = false && $BackupRandomDelay > 0) do={
|
||||||
|
|
@ -81,7 +69,6 @@
|
||||||
|
|
||||||
:if ([ $MkDir $DirName ] = false) do={
|
:if ([ $MkDir $DirName ] = false) do={
|
||||||
$LogPrint error $ScriptName ("Failed creating directory!");
|
$LogPrint error $ScriptName ("Failed creating directory!");
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -129,12 +116,9 @@
|
||||||
:if ($I >= 120) do={
|
:if ($I >= 120) do={
|
||||||
$LogPrint warning $ScriptName ("Files are still available, sending e-mail failed.");
|
$LogPrint warning $ScriptName ("Files are still available, sending e-mail failed.");
|
||||||
:set PackagesUpdateBackupFailure true;
|
:set PackagesUpdateBackupFailure true;
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
:delay 1s;
|
:delay 1s;
|
||||||
:set I ($I + 1);
|
:set I ($I + 1);
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,17 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: backup-partition
|
# RouterOS script: backup-partition
|
||||||
# Copyright (c) 2022-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2022-2024 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: backup-script, order=70
|
# provides: backup-script, order=70
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
# requires device-mode, scheduler
|
|
||||||
#
|
#
|
||||||
# save configuration to fallback partition
|
# save configuration to fallback partition
|
||||||
# https://rsc.eworm.de/doc/backup-partition.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/backup-partition.md
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -27,38 +25,28 @@
|
||||||
|
|
||||||
:local CopyTo do={
|
:local CopyTo do={
|
||||||
:local ScriptName [ :tostr $1 ];
|
:local ScriptName [ :tostr $1 ];
|
||||||
:local FallbackTo [ :toid $2 ];
|
:local FallbackTo [ :tostr $2 ];
|
||||||
:local FallbackToName [ :tostr $3 ];
|
|
||||||
|
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
|
|
||||||
:do {
|
:do {
|
||||||
/partitions/copy-to $FallbackTo;
|
/partitions/copy-to $FallbackTo;
|
||||||
$LogPrint info $ScriptName ("Copied RouterOS to partition '" . $FallbackToName . "'.");
|
$LogPrint info $ScriptName ("Copied RouterOS to partition '" . $FallbackTo . "'.");
|
||||||
:return true;
|
:return true;
|
||||||
} on-error={
|
} on-error={
|
||||||
$LogPrint error $ScriptName ("Failed copying RouterOS to partition '" . $FallbackToName . "'!");
|
$LogPrint error $ScriptName ("Failed copying RouterOS to partition '" . $FallbackTo . "'!");
|
||||||
:return false;
|
:return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set PackagesUpdateBackupFailure true;
|
:set PackagesUpdateBackupFailure true;
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
|
||||||
}
|
|
||||||
|
|
||||||
:if ([ :len [ /system/scheduler/find where name="running-from-backup-partition" ] ] > 0) do={
|
|
||||||
$LogPrint warning $ScriptName ("Running from backup partition, refusing to act.");
|
|
||||||
:set PackagesUpdateBackupFailure true;
|
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ :len [ /partitions/find ] ] < 2) do={
|
:if ([ :len [ /partitions/find ] ] < 2) do={
|
||||||
$LogPrint error $ScriptName ("Device does not have a fallback partition.");
|
$LogPrint error $ScriptName ("Device does not have a fallback partition.");
|
||||||
:set PackagesUpdateBackupFailure true;
|
:set PackagesUpdateBackupFailure true;
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -67,27 +55,17 @@
|
||||||
:if ([ :len $ActiveRunning ] < 1) do={
|
:if ([ :len $ActiveRunning ] < 1) do={
|
||||||
$LogPrint error $ScriptName ("Device is not running from active partition.");
|
$LogPrint error $ScriptName ("Device is not running from active partition.");
|
||||||
:set PackagesUpdateBackupFailure true;
|
:set PackagesUpdateBackupFailure true;
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
:local FallbackToName [ /partitions/get $ActiveRunning fallback-to ];
|
:local FallbackTo [ /partitions/get $ActiveRunning fallback-to ];
|
||||||
:local FallbackTo [ /partition/find where name=$FallbackToName !active ];
|
|
||||||
|
|
||||||
:if ([ :len $FallbackTo ] < 1) do={
|
|
||||||
$LogPrint error $ScriptName ("There is no inactive partition named '" . $FallbackToName . "'.");
|
|
||||||
:set PackagesUpdateBackupFailure true;
|
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
|
||||||
}
|
|
||||||
|
|
||||||
:if ([ /partitions/get $ActiveRunning version ] != [ /partitions/get $FallbackTo version]) do={
|
:if ([ /partitions/get $ActiveRunning version ] != [ /partitions/get $FallbackTo version]) do={
|
||||||
:if ([ $ScriptFromTerminal $ScriptName ] = true) do={
|
:if ([ $ScriptFromTerminal $ScriptName ] = true) do={
|
||||||
:put ("The partitions have different RouterOS versions. Copy over to '" . $FallbackToName . "'? [y/N]");
|
:put ("The partitions have different RouterOS versions. Copy over to '" . $FallbackTo . "'? [y/N]");
|
||||||
:if (([ /terminal/inkey timeout=60 ] % 32) = 25) do={
|
:if (([ /terminal/inkey timeout=60 ] % 32) = 25) do={
|
||||||
:if ([ $CopyTo $ScriptName $FallbackTo $FallbackToName ] = false) do={
|
:if ([ $CopyTo $ScriptName $FallbackTo ] = false) do={
|
||||||
:set PackagesUpdateBackupFailure true;
|
:set PackagesUpdateBackupFailure true;
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -95,12 +73,10 @@
|
||||||
:local Update [ /system/package/update/get ];
|
:local Update [ /system/package/update/get ];
|
||||||
:local NumInstalled [ $VersionToNum ($Update->"installed-version") ];
|
:local NumInstalled [ $VersionToNum ($Update->"installed-version") ];
|
||||||
:local NumLatest [ $VersionToNum ($Update->"latest-version") ];
|
:local NumLatest [ $VersionToNum ($Update->"latest-version") ];
|
||||||
:local BitMask [ $VersionToNum "255.255zero0" ];
|
|
||||||
:if ($BackupPartitionCopyBeforeFeatureUpdate = true && $NumLatest > 0 && \
|
:if ($BackupPartitionCopyBeforeFeatureUpdate = true && $NumLatest > 0 && \
|
||||||
($NumInstalled & $BitMask) != ($NumLatest & $BitMask)) do={
|
($NumInstalled & 0xffff0000) != ($NumLatest & 0xffff0000)) do={
|
||||||
:if ([ $CopyTo $ScriptName $FallbackTo $FallbackToName ] = false) do={
|
:if ([ $CopyTo $ScriptName $FallbackTo ] = false) do={
|
||||||
:set PackagesUpdateBackupFailure true;
|
:set PackagesUpdateBackupFailure true;
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -113,14 +89,11 @@
|
||||||
"[ /partitions/get [ find where running ] name ] . \"'!\")");
|
"[ /partitions/get [ find where running ] name ] . \"'!\")");
|
||||||
/partitions/save-config-to $FallbackTo;
|
/partitions/save-config-to $FallbackTo;
|
||||||
/system/scheduler/remove "running-from-backup-partition";
|
/system/scheduler/remove "running-from-backup-partition";
|
||||||
$LogPrint info $ScriptName ("Saved configuration to partition '" . $FallbackToName . "'.");
|
$LogPrint info $ScriptName ("Saved configuration to partition '" . $FallbackTo . "'.");
|
||||||
} on-error={
|
} on-error={
|
||||||
/system/scheduler/remove [ find where name="running-from-backup-partition" ];
|
/system/scheduler/remove [ find where name="running-from-backup-partition" ];
|
||||||
$LogPrint error $ScriptName ("Failed saving configuration to partition '" . $FallbackToName . "'!");
|
$LogPrint error $ScriptName ("Failed saving configuration to partition '" . $FallbackTo . "'!");
|
||||||
:set PackagesUpdateBackupFailure true;
|
:set PackagesUpdateBackupFailure true;
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,17 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: backup-upload
|
# RouterOS script: backup-upload
|
||||||
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: backup-script, order=50
|
# provides: backup-script, order=50
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
# requires device-mode, fetch
|
|
||||||
#
|
#
|
||||||
# create and upload backup and config file
|
# create and upload backup and config file
|
||||||
# https://rsc.eworm.de/doc/backup-upload.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/backup-upload.md
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -35,8 +33,6 @@
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
:global MkDir;
|
:global MkDir;
|
||||||
:global RandomDelay;
|
:global RandomDelay;
|
||||||
:global RmDir;
|
|
||||||
:global RmFile;
|
|
||||||
:global ScriptFromTerminal;
|
:global ScriptFromTerminal;
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
:global SendNotification2;
|
:global SendNotification2;
|
||||||
|
|
@ -47,23 +43,13 @@
|
||||||
:if ($BackupSendBinary != true && \
|
:if ($BackupSendBinary != true && \
|
||||||
$BackupSendExport != true) do={
|
$BackupSendExport != true) do={
|
||||||
$LogPrint error $ScriptName ("Configured to send neither backup nor config export.");
|
$LogPrint error $ScriptName ("Configured to send neither backup nor config export.");
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set PackagesUpdateBackupFailure true;
|
:set PackagesUpdateBackupFailure true;
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ :len [ /system/scheduler/find where name="running-from-backup-partition" ] ] > 0) do={
|
|
||||||
$LogPrint warning $ScriptName ("Running from backup partition, refusing to act.");
|
|
||||||
:set PackagesUpdateBackupFailure true;
|
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$WaitFullyConnected;
|
$WaitFullyConnected;
|
||||||
|
|
||||||
:if ([ $ScriptFromTerminal $ScriptName ] = false && $BackupRandomDelay > 0) do={
|
:if ([ $ScriptFromTerminal $ScriptName ] = false && $BackupRandomDelay > 0) do={
|
||||||
|
|
@ -81,7 +67,6 @@
|
||||||
|
|
||||||
:if ([ $MkDir $DirName ] = false) do={
|
:if ([ $MkDir $DirName ] = false) do={
|
||||||
$LogPrint error $ScriptName ("Failed creating directory!");
|
$LogPrint error $ScriptName ("Failed creating directory!");
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -101,7 +86,7 @@
|
||||||
:set Failed 1;
|
:set Failed 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$RmFile ($FilePath . ".backup");
|
/file/remove ($FilePath . ".backup");
|
||||||
}
|
}
|
||||||
|
|
||||||
# create configuration export
|
# create configuration export
|
||||||
|
|
@ -120,7 +105,7 @@
|
||||||
:set Failed 1;
|
:set Failed 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$RmFile ($FilePath . ".rsc");
|
/file/remove ($FilePath . ".rsc");
|
||||||
}
|
}
|
||||||
|
|
||||||
# global-config-overlay
|
# global-config-overlay
|
||||||
|
|
@ -141,7 +126,7 @@
|
||||||
:set Failed 1;
|
:set Failed 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$RmFile ($FilePath . ".conf");
|
/file/remove ($FilePath . ".conf");
|
||||||
}
|
}
|
||||||
|
|
||||||
:local FileInfo do={
|
:local FileInfo do={
|
||||||
|
|
@ -172,7 +157,5 @@
|
||||||
:if ($Failed = 1) do={
|
:if ($Failed = 1) do={
|
||||||
:set PackagesUpdateBackupFailure true;
|
:set PackagesUpdateBackupFailure true;
|
||||||
}
|
}
|
||||||
$RmDir $DirName;
|
/file/remove $DirName;
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,19 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: capsman-download-packages.capsman
|
# RouterOS script: capsman-download-packages.capsman
|
||||||
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
|
||||||
# Michael Gisbers <michael@gisbers.de>
|
# Michael Gisbers <michael@gisbers.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# download and cleanup packages for CAP installation from CAPsMAN
|
# download and cleanup packages for CAP installation from CAPsMAN
|
||||||
# https://rsc.eworm.de/doc/capsman-download-packages.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/capsman-download-packages.md
|
||||||
#
|
#
|
||||||
# !! Do not edit this file, it is generated from template!
|
# !! Do not edit this file, it is generated from template!
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -22,12 +21,10 @@
|
||||||
:global DownloadPackage;
|
:global DownloadPackage;
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
:global MkDir;
|
:global MkDir;
|
||||||
:global RmFile;
|
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
:global WaitFullyConnected;
|
:global WaitFullyConnected;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
$WaitFullyConnected;
|
$WaitFullyConnected;
|
||||||
|
|
@ -38,7 +35,6 @@
|
||||||
|
|
||||||
:if ([ :len $PackagePath ] = 0) do={
|
:if ([ :len $PackagePath ] = 0) do={
|
||||||
$LogPrint warning $ScriptName ("The CAPsMAN package path is not defined, can not download packages.");
|
$LogPrint warning $ScriptName ("The CAPsMAN package path is not defined, can not download packages.");
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -46,7 +42,6 @@
|
||||||
:if ([ $MkDir $PackagePath ] = false) do={
|
:if ([ $MkDir $PackagePath ] = false) do={
|
||||||
$LogPrint warning $ScriptName ("Creating directory at CAPsMAN package path (" . \
|
$LogPrint warning $ScriptName ("Creating directory at CAPsMAN package path (" . \
|
||||||
$PackagePath . ") failed!");
|
$PackagePath . ") failed!");
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
$LogPrint info $ScriptName ("Created directory at CAPsMAN package path (" . $PackagePath . \
|
$LogPrint info $ScriptName ("Created directory at CAPsMAN package path (" . $PackagePath . \
|
||||||
|
|
@ -62,7 +57,7 @@
|
||||||
:if ([ $DownloadPackage ($File->"package-name") $InstalledVersion \
|
:if ([ $DownloadPackage ($File->"package-name") $InstalledVersion \
|
||||||
($File->"package-architecture") $PackagePath ] = true) do={
|
($File->"package-architecture") $PackagePath ] = true) do={
|
||||||
:set Updated true;
|
:set Updated true;
|
||||||
$RmFile ($File->"name");
|
/file/remove $Package;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -78,15 +73,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ($Updated = true) do={
|
:if ($Updated = true) do={
|
||||||
:local Scripts [ /system/script/find where source~"\n# provides: capsman-rolling-upgrade.capsman\r?\n" ];
|
:local Script ([ /system/script/find where source~"\n# provides: capsman-rolling-upgrade\n" ]->0);
|
||||||
:if ([ :len $Scripts ] > 0) do={
|
:if ([ :len $Script ] > 0) do={
|
||||||
:foreach Script in=$Scripts do={
|
|
||||||
/system/script/run $Script;
|
/system/script/run $Script;
|
||||||
}
|
|
||||||
} else={
|
} else={
|
||||||
/caps-man/remote-cap/upgrade [ find where version!=$InstalledVersion ];
|
/caps-man/remote-cap/upgrade [ find where version!=$InstalledVersion ];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: capsman-download-packages%TEMPL%
|
# RouterOS script: capsman-download-packages%TEMPL%
|
||||||
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
|
||||||
# Michael Gisbers <michael@gisbers.de>
|
# Michael Gisbers <michael@gisbers.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# download and cleanup packages for CAP installation from CAPsMAN
|
# download and cleanup packages for CAP installation from CAPsMAN
|
||||||
# https://rsc.eworm.de/doc/capsman-download-packages.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/capsman-download-packages.md
|
||||||
#
|
#
|
||||||
# !! This is just a template to generate the real script!
|
# !! This is just a template to generate the real script!
|
||||||
# !! Pattern '%TEMPL%' is replaced, paths are filtered.
|
# !! Pattern '%TEMPL%' is replaced, paths are filtered.
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -23,12 +22,10 @@
|
||||||
:global DownloadPackage;
|
:global DownloadPackage;
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
:global MkDir;
|
:global MkDir;
|
||||||
:global RmFile;
|
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
:global WaitFullyConnected;
|
:global WaitFullyConnected;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
$WaitFullyConnected;
|
$WaitFullyConnected;
|
||||||
|
|
@ -40,7 +37,6 @@
|
||||||
|
|
||||||
:if ([ :len $PackagePath ] = 0) do={
|
:if ([ :len $PackagePath ] = 0) do={
|
||||||
$LogPrint warning $ScriptName ("The CAPsMAN package path is not defined, can not download packages.");
|
$LogPrint warning $ScriptName ("The CAPsMAN package path is not defined, can not download packages.");
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -48,7 +44,6 @@
|
||||||
:if ([ $MkDir $PackagePath ] = false) do={
|
:if ([ $MkDir $PackagePath ] = false) do={
|
||||||
$LogPrint warning $ScriptName ("Creating directory at CAPsMAN package path (" . \
|
$LogPrint warning $ScriptName ("Creating directory at CAPsMAN package path (" . \
|
||||||
$PackagePath . ") failed!");
|
$PackagePath . ") failed!");
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
$LogPrint info $ScriptName ("Created directory at CAPsMAN package path (" . $PackagePath . \
|
$LogPrint info $ScriptName ("Created directory at CAPsMAN package path (" . $PackagePath . \
|
||||||
|
|
@ -64,7 +59,7 @@
|
||||||
:if ([ $DownloadPackage ($File->"package-name") $InstalledVersion \
|
:if ([ $DownloadPackage ($File->"package-name") $InstalledVersion \
|
||||||
($File->"package-architecture") $PackagePath ] = true) do={
|
($File->"package-architecture") $PackagePath ] = true) do={
|
||||||
:set Updated true;
|
:set Updated true;
|
||||||
$RmFile ($File->"name");
|
/file/remove $Package;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -88,16 +83,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ($Updated = true) do={
|
:if ($Updated = true) do={
|
||||||
:local Scripts [ /system/script/find where source~"\n# provides: capsman-rolling-upgrade%TEMPL%\r?\n" ];
|
:local Script ([ /system/script/find where source~"\n# provides: capsman-rolling-upgrade\n" ]->0);
|
||||||
:if ([ :len $Scripts ] > 0) do={
|
:if ([ :len $Script ] > 0) do={
|
||||||
:foreach Script in=$Scripts do={
|
|
||||||
/system/script/run $Script;
|
/system/script/run $Script;
|
||||||
}
|
|
||||||
} else={
|
} else={
|
||||||
/caps-man/remote-cap/upgrade [ find where version!=$InstalledVersion ];
|
/caps-man/remote-cap/upgrade [ find where version!=$InstalledVersion ];
|
||||||
/interface/wifi/capsman/remote-cap/upgrade [ find where version!=$InstalledVersion ];
|
/interface/wifi/capsman/remote-cap/upgrade [ find where version!=$InstalledVersion ];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,19 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: capsman-download-packages.wifi
|
# RouterOS script: capsman-download-packages.wifi
|
||||||
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
|
||||||
# Michael Gisbers <michael@gisbers.de>
|
# Michael Gisbers <michael@gisbers.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# download and cleanup packages for CAP installation from CAPsMAN
|
# download and cleanup packages for CAP installation from CAPsMAN
|
||||||
# https://rsc.eworm.de/doc/capsman-download-packages.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/capsman-download-packages.md
|
||||||
#
|
#
|
||||||
# !! Do not edit this file, it is generated from template!
|
# !! Do not edit this file, it is generated from template!
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -22,12 +21,10 @@
|
||||||
:global DownloadPackage;
|
:global DownloadPackage;
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
:global MkDir;
|
:global MkDir;
|
||||||
:global RmFile;
|
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
:global WaitFullyConnected;
|
:global WaitFullyConnected;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
$WaitFullyConnected;
|
$WaitFullyConnected;
|
||||||
|
|
@ -38,7 +35,6 @@
|
||||||
|
|
||||||
:if ([ :len $PackagePath ] = 0) do={
|
:if ([ :len $PackagePath ] = 0) do={
|
||||||
$LogPrint warning $ScriptName ("The CAPsMAN package path is not defined, can not download packages.");
|
$LogPrint warning $ScriptName ("The CAPsMAN package path is not defined, can not download packages.");
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -46,7 +42,6 @@
|
||||||
:if ([ $MkDir $PackagePath ] = false) do={
|
:if ([ $MkDir $PackagePath ] = false) do={
|
||||||
$LogPrint warning $ScriptName ("Creating directory at CAPsMAN package path (" . \
|
$LogPrint warning $ScriptName ("Creating directory at CAPsMAN package path (" . \
|
||||||
$PackagePath . ") failed!");
|
$PackagePath . ") failed!");
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
$LogPrint info $ScriptName ("Created directory at CAPsMAN package path (" . $PackagePath . \
|
$LogPrint info $ScriptName ("Created directory at CAPsMAN package path (" . $PackagePath . \
|
||||||
|
|
@ -62,7 +57,7 @@
|
||||||
:if ([ $DownloadPackage ($File->"package-name") $InstalledVersion \
|
:if ([ $DownloadPackage ($File->"package-name") $InstalledVersion \
|
||||||
($File->"package-architecture") $PackagePath ] = true) do={
|
($File->"package-architecture") $PackagePath ] = true) do={
|
||||||
:set Updated true;
|
:set Updated true;
|
||||||
$RmFile ($File->"name");
|
/file/remove $Package;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -80,15 +75,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ($Updated = true) do={
|
:if ($Updated = true) do={
|
||||||
:local Scripts [ /system/script/find where source~"\n# provides: capsman-rolling-upgrade.wifi\r?\n" ];
|
:local Script ([ /system/script/find where source~"\n# provides: capsman-rolling-upgrade\n" ]->0);
|
||||||
:if ([ :len $Scripts ] > 0) do={
|
:if ([ :len $Script ] > 0) do={
|
||||||
:foreach Script in=$Scripts do={
|
|
||||||
/system/script/run $Script;
|
/system/script/run $Script;
|
||||||
}
|
|
||||||
} else={
|
} else={
|
||||||
/interface/wifi/capsman/remote-cap/upgrade [ find where version!=$InstalledVersion ];
|
/interface/wifi/capsman/remote-cap/upgrade [ find where version!=$InstalledVersion ];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,20 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: capsman-rolling-upgrade.capsman
|
# RouterOS script: capsman-rolling-upgrade.capsman
|
||||||
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
|
||||||
# Michael Gisbers <michael@gisbers.de>
|
# Michael Gisbers <michael@gisbers.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: capsman-rolling-upgrade.capsman
|
# provides: capsman-rolling-upgrade
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# upgrade CAPs one after another
|
# upgrade CAPs one after another
|
||||||
# https://rsc.eworm.de/doc/capsman-rolling-upgrade.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/capsman-rolling-upgrade.md
|
||||||
#
|
#
|
||||||
# !! Do not edit this file, it is generated from template!
|
# !! Do not edit this file, it is generated from template!
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -23,7 +22,6 @@
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -45,6 +43,4 @@
|
||||||
:delay ($Delay . "s");
|
:delay ($Delay . "s");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: capsman-rolling-upgrade%TEMPL%
|
# RouterOS script: capsman-rolling-upgrade%TEMPL%
|
||||||
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
|
||||||
# Michael Gisbers <michael@gisbers.de>
|
# Michael Gisbers <michael@gisbers.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: capsman-rolling-upgrade%TEMPL%
|
# provides: capsman-rolling-upgrade
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# upgrade CAPs one after another
|
# upgrade CAPs one after another
|
||||||
# https://rsc.eworm.de/doc/capsman-rolling-upgrade.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/capsman-rolling-upgrade.md
|
||||||
#
|
#
|
||||||
# !! This is just a template to generate the real script!
|
# !! This is just a template to generate the real script!
|
||||||
# !! Pattern '%TEMPL%' is replaced, paths are filtered.
|
# !! Pattern '%TEMPL%' is replaced, paths are filtered.
|
||||||
|
|
@ -16,7 +16,6 @@
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -24,7 +23,6 @@
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -53,6 +51,4 @@
|
||||||
:delay ($Delay . "s");
|
:delay ($Delay . "s");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,20 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: capsman-rolling-upgrade.wifi
|
# RouterOS script: capsman-rolling-upgrade.wifi
|
||||||
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
|
||||||
# Michael Gisbers <michael@gisbers.de>
|
# Michael Gisbers <michael@gisbers.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: capsman-rolling-upgrade.wifi
|
# provides: capsman-rolling-upgrade
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# upgrade CAPs one after another
|
# upgrade CAPs one after another
|
||||||
# https://rsc.eworm.de/doc/capsman-rolling-upgrade.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/capsman-rolling-upgrade.md
|
||||||
#
|
#
|
||||||
# !! Do not edit this file, it is generated from template!
|
# !! Do not edit this file, it is generated from template!
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -23,7 +22,6 @@
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -46,6 +44,4 @@
|
||||||
:delay ($Delay . "s");
|
:delay ($Delay . "s");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,16 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: certificate-renew-issued
|
# RouterOS script: certificate-renew-issued
|
||||||
# Copyright (c) 2019-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2019-2024 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# renew locally issued certificates
|
# renew locally issued certificates
|
||||||
# https://rsc.eworm.de/doc/certificate-renew-issued.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/certificate-renew-issued.md
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -22,7 +21,6 @@
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -47,6 +45,4 @@
|
||||||
$LogPrint info $ScriptName ("Issued a new certificate for '" . $CertVal->"common-name" . "'.");
|
$LogPrint info $ScriptName ("Issued a new certificate for '" . $CertVal->"common-name" . "'.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
28
certs/Baltimore-CyberTrust-Root.pem
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
# Issuer: CN=Baltimore CyberTrust Root O=Baltimore OU=CyberTrust
|
||||||
|
# Subject: CN=Baltimore CyberTrust Root O=Baltimore OU=CyberTrust
|
||||||
|
# Label: "Baltimore CyberTrust Root"
|
||||||
|
# Serial: 33554617
|
||||||
|
# MD5 Fingerprint: ac:b6:94:a5:9c:17:e0:d7:91:52:9b:b1:97:06:a6:e4
|
||||||
|
# SHA1 Fingerprint: d4:de:20:d0:5e:66:fc:53:fe:1a:50:88:2c:78:db:28:52:ca:e4:74
|
||||||
|
# SHA256 Fingerprint: 16:af:57:a9:f6:76:b0:ab:12:60:95:aa:5e:ba:de:f2:2a:b3:11:19:d6:44:ac:95:cd:4b:93:db:f3:f2:6a:eb
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJ
|
||||||
|
RTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYD
|
||||||
|
VQQDExlCYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoX
|
||||||
|
DTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMCSUUxEjAQBgNVBAoTCUJhbHRpbW9y
|
||||||
|
ZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFsdGltb3JlIEN5YmVy
|
||||||
|
VHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKMEuyKr
|
||||||
|
mD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjr
|
||||||
|
IZ3AQSsBUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeK
|
||||||
|
mpYcqWe4PwzV9/lSEy/CG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSu
|
||||||
|
XmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9XbIGevOF6uvUA65ehD5f/xXtabz5OTZy
|
||||||
|
dc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjprl3RjM71oGDHweI12v/ye
|
||||||
|
jl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoIVDaGezq1
|
||||||
|
BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3
|
||||||
|
DQEBBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT92
|
||||||
|
9hkTI7gQCvlYpNRhcL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3Wgx
|
||||||
|
jkzSswF07r51XgdIGn9w/xZchMB5hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0
|
||||||
|
Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsaY71k5h+3zvDyny67G7fyUIhz
|
||||||
|
ksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9HRCwBXbsdtTLS
|
||||||
|
R9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp
|
||||||
|
-----END CERTIFICATE-----
|
||||||
29
certs/DigiCert-Global-Root-CA.pem
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
# Issuer: CN=DigiCert Global Root CA O=DigiCert Inc OU=www.digicert.com
|
||||||
|
# Subject: CN=DigiCert Global Root CA O=DigiCert Inc OU=www.digicert.com
|
||||||
|
# Label: "DigiCert Global Root CA"
|
||||||
|
# Serial: 10944719598952040374951832963794454346
|
||||||
|
# MD5 Fingerprint: 79:e4:a9:84:0d:7d:3a:96:d7:c0:4f:e2:43:4c:89:2e
|
||||||
|
# SHA1 Fingerprint: a8:98:5d:3a:65:e5:e5:c4:b2:d7:d6:6d:40:c6:dd:2f:b1:9c:54:36
|
||||||
|
# SHA256 Fingerprint: 43:48:a0:e9:44:4c:78:cb:26:5e:05:8d:5e:89:44:b4:d8:4f:96:62:bd:26:db:25:7f:89:34:a4:43:c7:01:61
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBh
|
||||||
|
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
|
||||||
|
d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD
|
||||||
|
QTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAwMDAwMDBaMGExCzAJBgNVBAYTAlVT
|
||||||
|
MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j
|
||||||
|
b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkqhkiG
|
||||||
|
9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsB
|
||||||
|
CSDMAZOnTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97
|
||||||
|
nh6Vfe63SKMI2tavegw5BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt
|
||||||
|
43C/dxC//AH2hdmoRBBYMql1GNXRor5H4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7P
|
||||||
|
T19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y7vrTC0LUq7dBMtoM1O/4
|
||||||
|
gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQABo2MwYTAO
|
||||||
|
BgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbR
|
||||||
|
TLtm8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUw
|
||||||
|
DQYJKoZIhvcNAQEFBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/Esr
|
||||||
|
hMAtudXH/vTBH1jLuG2cenTnmCmrEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg
|
||||||
|
06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIttep3Sp+dWOIrWcBAI+0tKIJF
|
||||||
|
PnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886UAb3LujEV0ls
|
||||||
|
YSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk
|
||||||
|
CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=
|
||||||
|
-----END CERTIFICATE-----
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
# Issuer: CN=DigiCert Global Root G3 O=DigiCert Inc OU=www.digicert.com
|
|
||||||
# Subject: CN=DigiCert Global Root G3 O=DigiCert Inc OU=www.digicert.com
|
|
||||||
# Label: "DigiCert Global Root G3"
|
|
||||||
# Serial: 7089244469030293291760083333884364146
|
|
||||||
# MD5 Fingerprint: f5:5d:a4:50:a5:fb:28:7e:1e:0f:0d:cc:96:57:56:ca
|
|
||||||
# SHA1 Fingerprint: 7e:04:de:89:6a:3e:66:6d:00:e6:87:d3:3f:fa:d9:3b:e8:3d:34:9e
|
|
||||||
# SHA256 Fingerprint: 31:ad:66:48:f8:10:41:38:c7:38:f3:9e:a4:32:01:33:39:3e:3a:18:cc:02:29:6e:f9:7c:2a:c9:ef:67:31:d0
|
|
||||||
-----BEGIN CERTIFICATE-----
|
|
||||||
MIICPzCCAcWgAwIBAgIQBVVWvPJepDU1w6QP1atFcjAKBggqhkjOPQQDAzBhMQsw
|
|
||||||
CQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cu
|
|
||||||
ZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAe
|
|
||||||
Fw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAwMDBaMGExCzAJBgNVBAYTAlVTMRUw
|
|
||||||
EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
|
|
||||||
IDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEczMHYwEAYHKoZIzj0CAQYF
|
|
||||||
K4EEACIDYgAE3afZu4q4C/sLfyHS8L6+c/MzXRq8NOrexpu80JX28MzQC7phW1FG
|
|
||||||
fp4tn+6OYwwX7Adw9c+ELkCDnOg/QW07rdOkFFk2eJ0DQ+4QE2xy3q6Ip6FrtUPO
|
|
||||||
Z9wj/wMco+I+o0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAd
|
|
||||||
BgNVHQ4EFgQUs9tIpPmhxdiuNkHMEWNpYim8S8YwCgYIKoZIzj0EAwMDaAAwZQIx
|
|
||||||
AK288mw/EkrRLTnDCgmXc/SINoyIJ7vmiI1Qhadj+Z4y3maTD/HMsQmP3Wyr+mt/
|
|
||||||
oAIwOWZbwmSNuJ5Q3KjVSaLtx9zRSX8XAbjIho9OjIgrqJqpisXRAL34VOKa5Vt8
|
|
||||||
sycX
|
|
||||||
-----END CERTIFICATE-----
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
# Issuer: CN=GTS Root R4 O=Google Trust Services LLC
|
|
||||||
# Subject: CN=GTS Root R4 O=Google Trust Services LLC
|
|
||||||
# Label: "GTS Root R4"
|
|
||||||
# Serial: 159662532700760215368942768210
|
|
||||||
# MD5 Fingerprint: 43:96:83:77:19:4d:76:b3:9d:65:52:e4:1d:22:a5:e8
|
|
||||||
# SHA1 Fingerprint: 77:d3:03:67:b5:e0:0c:15:f6:0c:38:61:df:7c:e1:3b:92:46:4d:47
|
|
||||||
# SHA256 Fingerprint: 34:9d:fa:40:58:c5:e2:63:12:3b:39:8a:e7:95:57:3c:4e:13:13:c8:3f:e6:8f:93:55:6c:d5:e8:03:1b:3c:7d
|
|
||||||
-----BEGIN CERTIFICATE-----
|
|
||||||
MIICCTCCAY6gAwIBAgINAgPlwGjvYxqccpBQUjAKBggqhkjOPQQDAzBHMQswCQYD
|
|
||||||
VQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2VzIExMQzEUMBIG
|
|
||||||
A1UEAxMLR1RTIFJvb3QgUjQwHhcNMTYwNjIyMDAwMDAwWhcNMzYwNjIyMDAwMDAw
|
|
||||||
WjBHMQswCQYDVQQGEwJVUzEiMCAGA1UEChMZR29vZ2xlIFRydXN0IFNlcnZpY2Vz
|
|
||||||
IExMQzEUMBIGA1UEAxMLR1RTIFJvb3QgUjQwdjAQBgcqhkjOPQIBBgUrgQQAIgNi
|
|
||||||
AATzdHOnaItgrkO4NcWBMHtLSZ37wWHO5t5GvWvVYRg1rkDdc/eJkTBa6zzuhXyi
|
|
||||||
QHY7qca4R9gq55KRanPpsXI5nymfopjTX15YhmUPoYRlBtHci8nHc8iMai/lxKvR
|
|
||||||
HYqjQjBAMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQW
|
|
||||||
BBSATNbrdP9JNqPV2Py1PsVq8JQdjDAKBggqhkjOPQQDAwNpADBmAjEA6ED/g94D
|
|
||||||
9J+uHXqnLrmvT/aDHQ4thQEd0dlq7A/Cr8deVl5c1RxYIigL9zC2L7F8AjEA8GE8
|
|
||||||
p/SgguMh1YQdc4acLa/KNJvxn7kjNuK8YAOdgLOaVsjh4rsUecrNIdSUtUlD
|
|
||||||
-----END CERTIFICATE-----
|
|
||||||
28
certs/GlobalSign.pem
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
# Issuer: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R3
|
||||||
|
# Subject: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R3
|
||||||
|
# Label: "GlobalSign Root CA - R3"
|
||||||
|
# Serial: 4835703278459759426209954
|
||||||
|
# MD5 Fingerprint: c5:df:b8:49:ca:05:13:55:ee:2d:ba:1a:c3:3e:b0:28
|
||||||
|
# SHA1 Fingerprint: d6:9b:56:11:48:f0:1c:77:c5:45:78:c1:09:26:df:5b:85:69:76:ad
|
||||||
|
# SHA256 Fingerprint: cb:b5:22:d7:b7:f1:27:ad:6a:01:13:86:5b:df:1c:d4:10:2e:7d:07:59:af:63:5a:7c:f4:72:0d:c9:63:c5:3b
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4G
|
||||||
|
A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNp
|
||||||
|
Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4
|
||||||
|
MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEG
|
||||||
|
A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI
|
||||||
|
hvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWtiHL8
|
||||||
|
RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsT
|
||||||
|
gHeMCOFJ0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmm
|
||||||
|
KPZpO/bLyCiR5Z2KYVc3rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zd
|
||||||
|
QQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjlOCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZ
|
||||||
|
XriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2xmmFghcCAwEAAaNCMEAw
|
||||||
|
DgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI/wS3+o
|
||||||
|
LkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZU
|
||||||
|
RUm7lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMp
|
||||||
|
jjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK
|
||||||
|
6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX
|
||||||
|
mcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs
|
||||||
|
Mx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH
|
||||||
|
WD9f
|
||||||
|
-----END CERTIFICATE-----
|
||||||
|
|
@ -1,58 +0,0 @@
|
||||||
# Makefile to check certificates
|
|
||||||
|
|
||||||
CURL = curl \
|
|
||||||
--capath /dev/null \
|
|
||||||
--connect-timeout 5 \
|
|
||||||
--output /dev/null \
|
|
||||||
--silent
|
|
||||||
|
|
||||||
DOMAINS_DUAL = \
|
|
||||||
api.macvendors.com/GTS-Root-R4 \
|
|
||||||
api.telegram.org/Go-Daddy-Root-Certificate-Authority-G2 \
|
|
||||||
cloudflare-dns.com/DigiCert-Global-Root-G2 \
|
|
||||||
dns.google/GTS-Root-R4 \
|
|
||||||
dns.quad9.net/DigiCert-Global-Root-G3 \
|
|
||||||
git.eworm.de/ISRG-Root-X2 \
|
|
||||||
lists.blocklist.de/Certum-Trusted-Network-CA \
|
|
||||||
matrix.org/GTS-Root-R4 \
|
|
||||||
raw.githubusercontent.com/USERTrust-RSA-Certification-Authority \
|
|
||||||
rsc.eworm.de/ISRG-Root-X2 \
|
|
||||||
upgrade.mikrotik.com/ISRG-Root-X1
|
|
||||||
DOMAINS_IPV4 = \
|
|
||||||
1.1.1.1/DigiCert-Global-Root-G2 \
|
|
||||||
8.8.8.8/GTS-Root-R1 \
|
|
||||||
9.9.9.9/DigiCert-Global-Root-G3 \
|
|
||||||
api.mullvad.net/ISRG-Root-X1 \
|
|
||||||
ipv4.showipv6.de/ISRG-Root-X1 \
|
|
||||||
ipv4.tunnelbroker.net/Starfield-Root-Certificate-Authority-G2 \
|
|
||||||
mkcert.org/ISRG-Root-X1 \
|
|
||||||
ntfy.sh/ISRG-Root-X1 \
|
|
||||||
www.dshield.org/ISRG-Root-X1 \
|
|
||||||
www.spamhaus.org/GTS-Root-R4
|
|
||||||
DOMAINS_IPV6 = \
|
|
||||||
[2606\:4700\:4700\:\:1111]/DigiCert-Global-Root-G2 \
|
|
||||||
[2001\:4860\:4860\:\:8888]/GTS-Root-R1 \
|
|
||||||
[2620\:fe\:\:9]/DigiCert-Global-Root-G3 \
|
|
||||||
ipv6.showipv6.de/ISRG-Root-X1
|
|
||||||
|
|
||||||
.PHONY: $(DOMAINS_DUAL) $(DOMAINS_IPV4) $(DOMAINS_IPV6)
|
|
||||||
|
|
||||||
all: $(DOMAINS_DUAL) $(DOMAINS_IPV4) $(DOMAINS_IPV6)
|
|
||||||
|
|
||||||
$(DOMAINS_DUAL):
|
|
||||||
ifndef NOIPV4
|
|
||||||
$(CURL) -4 --cacert $(notdir $@).pem https://$(dir $@)
|
|
||||||
endif
|
|
||||||
ifndef NOIPV6
|
|
||||||
$(CURL) -6 --cacert $(notdir $@).pem https://$(dir $@)
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(DOMAINS_IPV4):
|
|
||||||
ifndef NOIPV4
|
|
||||||
$(CURL) -4 --cacert $(notdir $@).pem https://$(dir $@)
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(DOMAINS_IPV6):
|
|
||||||
ifndef NOIPV6
|
|
||||||
$(CURL) -6 --cacert $(notdir $@).pem https://$(dir $@)
|
|
||||||
endif
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
# Issuer: CN=USERTrust RSA Certification Authority O=The USERTRUST Network
|
|
||||||
# Subject: CN=USERTrust RSA Certification Authority O=The USERTRUST Network
|
|
||||||
# Label: "USERTrust RSA Certification Authority"
|
|
||||||
# Serial: 2645093764781058787591871645665788717
|
|
||||||
# MD5 Fingerprint: 1b:fe:69:d1:91:b7:19:33:a3:72:a8:0f:e1:55:e5:b5
|
|
||||||
# SHA1 Fingerprint: 2b:8f:1b:57:33:0d:bb:a2:d0:7a:6c:51:f7:0e:e9:0d:da:b9:ad:8e
|
|
||||||
# SHA256 Fingerprint: e7:93:c9:b0:2f:d8:aa:13:e2:1c:31:22:8a:cc:b0:81:19:64:3b:74:9c:89:89:64:b1:74:6d:46:c3:d4:cb:d2
|
|
||||||
-----BEGIN CERTIFICATE-----
|
|
||||||
MIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCB
|
|
||||||
iDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0pl
|
|
||||||
cnNleSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNV
|
|
||||||
BAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTAw
|
|
||||||
MjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UEBhMCVVMxEzARBgNV
|
|
||||||
BAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU
|
|
||||||
aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2Vy
|
|
||||||
dGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIK
|
|
||||||
AoICAQCAEmUXNg7D2wiz0KxXDXbtzSfTTK1Qg2HiqiBNCS1kCdzOiZ/MPans9s/B
|
|
||||||
3PHTsdZ7NygRK0faOca8Ohm0X6a9fZ2jY0K2dvKpOyuR+OJv0OwWIJAJPuLodMkY
|
|
||||||
tJHUYmTbf6MG8YgYapAiPLz+E/CHFHv25B+O1ORRxhFnRghRy4YUVD+8M/5+bJz/
|
|
||||||
Fp0YvVGONaanZshyZ9shZrHUm3gDwFA66Mzw3LyeTP6vBZY1H1dat//O+T23LLb2
|
|
||||||
VN3I5xI6Ta5MirdcmrS3ID3KfyI0rn47aGYBROcBTkZTmzNg95S+UzeQc0PzMsNT
|
|
||||||
79uq/nROacdrjGCT3sTHDN/hMq7MkztReJVni+49Vv4M0GkPGw/zJSZrM233bkf6
|
|
||||||
c0Plfg6lZrEpfDKEY1WJxA3Bk1QwGROs0303p+tdOmw1XNtB1xLaqUkL39iAigmT
|
|
||||||
Yo61Zs8liM2EuLE/pDkP2QKe6xJMlXzzawWpXhaDzLhn4ugTncxbgtNMs+1b/97l
|
|
||||||
c6wjOy0AvzVVdAlJ2ElYGn+SNuZRkg7zJn0cTRe8yexDJtC/QV9AqURE9JnnV4ee
|
|
||||||
UB9XVKg+/XRjL7FQZQnmWEIuQxpMtPAlR1n6BB6T1CZGSlCBst6+eLf8ZxXhyVeE
|
|
||||||
Hg9j1uliutZfVS7qXMYoCAQlObgOK6nyTJccBz8NUvXt7y+CDwIDAQABo0IwQDAd
|
|
||||||
BgNVHQ4EFgQUU3m/WqorSs9UgOHYm8Cd8rIDZsswDgYDVR0PAQH/BAQDAgEGMA8G
|
|
||||||
A1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAFzUfA3P9wF9QZllDHPF
|
|
||||||
Up/L+M+ZBn8b2kMVn54CVVeWFPFSPCeHlCjtHzoBN6J2/FNQwISbxmtOuowhT6KO
|
|
||||||
VWKR82kV2LyI48SqC/3vqOlLVSoGIG1VeCkZ7l8wXEskEVX/JJpuXior7gtNn3/3
|
|
||||||
ATiUFJVDBwn7YKnuHKsSjKCaXqeYalltiz8I+8jRRa8YFWSQEg9zKC7F4iRO/Fjs
|
|
||||||
8PRF/iKz6y+O0tlFYQXBl2+odnKPi4w2r78NBc5xjeambx9spnFixdjQg3IM8WcR
|
|
||||||
iQycE0xyNN+81XHfqnHd4blsjDwSXWXavVcStkNr/+XeTWYRUc+ZruwXtuhxkYze
|
|
||||||
Sf7dNXGiFSeUHM9h4ya7b6NnJSFd5t0dCy5oGzuCr+yDZ4XUmFF0sbmZgIn/f3gZ
|
|
||||||
XHlKYC6SQK5MNyosycdiyA5d9zZbyuAlJQG03RoHnHcAP9Dc1ew91Pq7P8yF1m9/
|
|
||||||
qS3fuQL39ZeatTXaw2ewh0qpKJ4jjv9cJ2vhsE/zB+4ALtRZh8tSQZXq9EfX7mRB
|
|
||||||
VXyNWQKV3WKdwrnuWih0hKWbt5DHDAff9Yk2dDLWKMGwsAvgnEzDHNb842m1R0aB
|
|
||||||
L6KCq9NjRHDEjf8tM7qtj3u1cIiuPhnPQCjY/MiQu12ZIvVS5ljFH4gxQ+6IHdfG
|
|
||||||
jjxDah2nGN59PRbxYvnKkKj9
|
|
||||||
-----END CERTIFICATE-----
|
|
||||||
|
|
@ -1,18 +1,16 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: check-certificates
|
# RouterOS script: check-certificates
|
||||||
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
# requires device-mode, fetch
|
|
||||||
#
|
#
|
||||||
# check for certificate validity
|
# check for certificate validity
|
||||||
# https://rsc.eworm.de/doc/check-certificates.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/check-certificates.md
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -34,8 +32,7 @@
|
||||||
|
|
||||||
:local CheckCertificatesDownloadImport do={
|
:local CheckCertificatesDownloadImport do={
|
||||||
:local ScriptName [ :tostr $1 ];
|
:local ScriptName [ :tostr $1 ];
|
||||||
:local CertName [ :tostr $2 ];
|
:local Name [ :tostr $2 ];
|
||||||
:local FetchName [ :tostr $3 ];
|
|
||||||
|
|
||||||
:global CertRenewUrl;
|
:global CertRenewUrl;
|
||||||
:global CertRenewPass;
|
:global CertRenewPass;
|
||||||
|
|
@ -44,51 +41,43 @@
|
||||||
:global EscapeForRegEx;
|
:global EscapeForRegEx;
|
||||||
:global FetchUserAgentStr;
|
:global FetchUserAgentStr;
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
:global RmFile;
|
|
||||||
:global UrlEncode;
|
:global UrlEncode;
|
||||||
:global WaitForFile;
|
:global WaitForFile;
|
||||||
|
|
||||||
:foreach Type in={ "p12"; "pem" } do={
|
:local Return false;
|
||||||
:local CertFileName ([ $UrlEncode $FetchName ] . "." . $Type);
|
|
||||||
$LogPrint debug $ScriptName ("Trying type '" . $Type . "' for '" . $CertName . \
|
|
||||||
"' (file '" . $CertFileName . "')...");
|
|
||||||
|
|
||||||
|
:foreach Type in={ ".pem"; ".p12" } do={
|
||||||
|
:local CertFileName ([ $UrlEncode $Name ] . $Type);
|
||||||
:do {
|
:do {
|
||||||
/tool/fetch check-certificate=yes-without-crl http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) \
|
/tool/fetch check-certificate=yes-without-crl http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) \
|
||||||
($CertRenewUrl . $CertFileName) dst-path=$CertFileName as-value;
|
($CertRenewUrl . $CertFileName) dst-path=$CertFileName as-value;
|
||||||
$WaitForFile $CertFileName;
|
$WaitForFile $CertFileName;
|
||||||
|
|
||||||
:local DecryptionFailed true;
|
:local DecryptionFailed true;
|
||||||
:foreach I,PassPhrase in=$CertRenewPass do={
|
:foreach PassPhrase in=$CertRenewPass do={
|
||||||
:do {
|
|
||||||
$LogPrint debug $ScriptName ("Trying " . $I . ". passphrase... ");
|
|
||||||
:local Result [ /certificate/import file-name=$CertFileName passphrase=$PassPhrase as-value ];
|
:local Result [ /certificate/import file-name=$CertFileName passphrase=$PassPhrase as-value ];
|
||||||
:if ($Result->"decryption-failures" = 0) do={
|
:if ($Result->"decryption-failures" = 0) do={
|
||||||
$LogPrint debug $ScriptName ("Success!");
|
|
||||||
:set DecryptionFailed false;
|
:set DecryptionFailed false;
|
||||||
}
|
}
|
||||||
} on-error={ }
|
|
||||||
}
|
}
|
||||||
$RmFile $CertFileName;
|
/file/remove [ find where name=$CertFileName ];
|
||||||
|
|
||||||
:if ($DecryptionFailed = true) do={
|
:if ($DecryptionFailed = true) do={
|
||||||
$LogPrint warning $ScriptName ("Decryption failed for certificate file '" . $CertFileName . "'.");
|
$LogPrint warning $ScriptName ("Decryption failed for certificate file '" . $CertFileName . "'.");
|
||||||
}
|
}
|
||||||
|
|
||||||
:foreach CertInChain in=[ /certificate/find where common-name!=$CertName !private-key \
|
:foreach CertInChain in=[ /certificate/find where name~("^" . [ $EscapeForRegEx $CertFileName ] . "_[0-9]+\$") \
|
||||||
name~("^" . [ $EscapeForRegEx $CertFileName ] . "_[0-9]+\$") \
|
common-name!=$Name !(subject-alt-name~("(^|\\W)(DNS|IP):" . [ $EscapeForRegEx $Name ] . "(\\W|\$)")) !(common-name=[]) ] do={
|
||||||
!(subject-alt-name~("(^|\\W)(DNS|IP):" . [ $EscapeForRegEx $CertName ] . "(\\W|\$)")) \
|
|
||||||
!(common-name=[]) ] do={
|
|
||||||
$CertificateNameByCN [ /certificate/get $CertInChain common-name ];
|
$CertificateNameByCN [ /certificate/get $CertInChain common-name ];
|
||||||
}
|
}
|
||||||
|
|
||||||
:return true;
|
:set Return true;
|
||||||
} on-error={
|
} on-error={
|
||||||
$LogPrint debug $ScriptName ("Could not download certificate file '" . $CertFileName . "'.");
|
$LogPrint debug $ScriptName ("Could not download certificate file '" . $CertFileName . "'.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:return false;
|
:return $Return;
|
||||||
}
|
}
|
||||||
|
|
||||||
:local FormatInfo do={
|
:local FormatInfo do={
|
||||||
|
|
@ -144,15 +133,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
$WaitFullyConnected;
|
$WaitFullyConnected;
|
||||||
|
|
||||||
:foreach Cert in=[ /certificate/find where !revoked !ca !scep-url expires-after<$CertRenewTime ] do={
|
:foreach Cert in=[ /certificate/find where !revoked !ca !scep-url expires-after<$CertRenewTime ] do={
|
||||||
:local CertVal [ /certificate/get $Cert ];
|
:local CertVal [ /certificate/get $Cert ];
|
||||||
|
:local CertNew;
|
||||||
:local LastName;
|
:local LastName;
|
||||||
:local FetchName;
|
|
||||||
|
|
||||||
:do {
|
:do {
|
||||||
:if ([ :len $CertRenewUrl ] = 0) do={
|
:if ([ :len $CertRenewUrl ] = 0) do={
|
||||||
|
|
@ -163,17 +151,11 @@
|
||||||
|
|
||||||
:local ImportSuccess false;
|
:local ImportSuccess false;
|
||||||
:set LastName ($CertVal->"common-name");
|
:set LastName ($CertVal->"common-name");
|
||||||
:set FetchName $LastName;
|
:set ImportSuccess [ $CheckCertificatesDownloadImport $ScriptName $LastName ];
|
||||||
:set ImportSuccess [ $CheckCertificatesDownloadImport $ScriptName $LastName $FetchName ];
|
|
||||||
:foreach SAN in=($CertVal->"subject-alt-name") do={
|
:foreach SAN in=($CertVal->"subject-alt-name") do={
|
||||||
:if ($ImportSuccess = false) do={
|
:if ($ImportSuccess = false) do={
|
||||||
:set LastName [ :pick $SAN ([ :find $SAN ":" ] + 1) [ :len $SAN ] ];
|
:set LastName [ :pick $SAN ([ :find $SAN ":" ] + 1) [ :len $SAN ] ];
|
||||||
:set FetchName $LastName;
|
:set ImportSuccess [ $CheckCertificatesDownloadImport $ScriptName $LastName ];
|
||||||
:set ImportSuccess [ $CheckCertificatesDownloadImport $ScriptName $LastName $FetchName ];
|
|
||||||
:if ($ImportSuccess = false && [ :pick $LastName 0 2 ] = "*.") do={
|
|
||||||
:set FetchName ("star." . [ :pick $LastName 2 [ :len $LastName ] ]);
|
|
||||||
:set ImportSuccess [ $CheckCertificatesDownloadImport $ScriptName $LastName $FetchName ];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
:if ($ImportSuccess = false) do={ :error false; }
|
:if ($ImportSuccess = false) do={ :error false; }
|
||||||
|
|
@ -184,7 +166,7 @@
|
||||||
} else={
|
} else={
|
||||||
$LogPrint debug $ScriptName ("Certificate '" . $CertVal->"name" . "' was not updated, but replaced.");
|
$LogPrint debug $ScriptName ("Certificate '" . $CertVal->"name" . "' was not updated, but replaced.");
|
||||||
|
|
||||||
:local CertNew [ /certificate/find where name~("^" . [ $EscapeForRegEx [ $UrlEncode $FetchName ] ] . "\\.(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|\$)")) \
|
(common-name=($CertVal->"common-name") or subject-alt-name~("(^|\\W)(DNS|IP):" . [ $EscapeForRegEx $LastName ] . "(\\W|\$)")) \
|
||||||
fingerprint!=[ :tostr ($CertVal->"fingerprint") ] expires-after>$CertRenewTime ];
|
fingerprint!=[ :tostr ($CertVal->"fingerprint") ] expires-after>$CertRenewTime ];
|
||||||
:local CertNewVal [ /certificate/get $CertNew ];
|
:local CertNewVal [ /certificate/get $CertNew ];
|
||||||
|
|
@ -208,13 +190,13 @@
|
||||||
|
|
||||||
/certificate/remove $Cert;
|
/certificate/remove $Cert;
|
||||||
/certificate/set $CertNew name=($CertVal->"name");
|
/certificate/set $CertNew name=($CertVal->"name");
|
||||||
:set Cert $CertNew;
|
:set CertNewVal;
|
||||||
:set CertVal [ /certificate/get $CertNew ];
|
:set CertVal [ /certificate/get $CertNew ];
|
||||||
}
|
}
|
||||||
|
|
||||||
$SendNotification2 ({ origin=$ScriptName; silent=true; \
|
$SendNotification2 ({ origin=$ScriptName; silent=true; \
|
||||||
subject=([ $SymbolForNotification "lock-with-ink-pen" ] . "Certificate renewed: " . ($CertVal->"name")); \
|
subject=([ $SymbolForNotification "lock-with-ink-pen" ] . "Certificate renewed: " . ($CertVal->"name")); \
|
||||||
message=("A certificate on " . $Identity . " has been renewed.\n\n" . [ $FormatInfo $Cert ]) });
|
message=("A certificate on " . $Identity . " has been renewed.\n\n" . [ $FormatInfo $CertNew ]) });
|
||||||
$LogPrint info $ScriptName ("The certificate '" . ($CertVal->"name") . "' has been renewed.");
|
$LogPrint info $ScriptName ("The certificate '" . ($CertVal->"name") . "' has been renewed.");
|
||||||
} on-error={
|
} on-error={
|
||||||
$LogPrint debug $ScriptName ("Could not renew certificate '" . ($CertVal->"name") . "'.");
|
$LogPrint debug $ScriptName ("Could not renew certificate '" . ($CertVal->"name") . "'.");
|
||||||
|
|
@ -237,6 +219,4 @@
|
||||||
", it is invalid after " . ($CertVal->"invalid-after") . ".");
|
", it is invalid after " . ($CertVal->"invalid-after") . ".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
#!rsc by RouterOS
|
|
||||||
# RouterOS script: check-health.d/state
|
|
||||||
# Copyright (c) 2019-2025 Christian Hesse <mail@eworm.de>
|
|
||||||
# https://rsc.eworm.de/COPYING.md
|
|
||||||
#
|
|
||||||
# requires RouterOS, version=7.15
|
|
||||||
#
|
|
||||||
# check for RouterOS health state - state plugin
|
|
||||||
# https://rsc.eworm.de/doc/check-health.md
|
|
||||||
|
|
||||||
:global CheckHealthPlugins;
|
|
||||||
|
|
||||||
:set ($CheckHealthPlugins->[ :jobname ]) do={
|
|
||||||
:local FuncName [ :tostr $0 ];
|
|
||||||
|
|
||||||
:global CheckHealthLast;
|
|
||||||
:global Identity;
|
|
||||||
|
|
||||||
:global LogPrint;
|
|
||||||
:global SendNotification2;
|
|
||||||
:global SymbolForNotification;
|
|
||||||
|
|
||||||
:if ([ :len [ /system/health/find where type="" name~"-state\$"] ] = 0) do={
|
|
||||||
$LogPrint debug $FuncName ("Your device does not provide any state health values.");
|
|
||||||
:return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
:foreach State in=[ /system/health/find where type="" name~"-state\$" ] do={
|
|
||||||
:local Name [ /system/health/get $State name ];
|
|
||||||
:local Value [ /system/health/get $State value ];
|
|
||||||
|
|
||||||
:if ([ :typeof ($CheckHealthLast->$Name) ] != "nothing") do={
|
|
||||||
:if ($CheckHealthLast->$Name = "ok" && \
|
|
||||||
$Value != "ok") do={
|
|
||||||
$SendNotification2 ({ origin=$FuncName; \
|
|
||||||
subject=([ $SymbolForNotification "cross-mark" ] . "Health warning: " . $Name); \
|
|
||||||
message=("The device '" . $Name . "' on " . $Identity . " failed!") });
|
|
||||||
}
|
|
||||||
:if ($CheckHealthLast->$Name != "ok" && \
|
|
||||||
$Value = "ok") do={
|
|
||||||
$SendNotification2 ({ origin=$FuncName; \
|
|
||||||
subject=([ $SymbolForNotification "white-heavy-check-mark" ] . "Health recovery: " . $Name); \
|
|
||||||
message=("The device '" . $Name . "' on " . $Identity . " recovered!") });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
:set ($CheckHealthLast->$Name) $Value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,74 +0,0 @@
|
||||||
#!rsc by RouterOS
|
|
||||||
# RouterOS script: check-health.d/temperature
|
|
||||||
# Copyright (c) 2019-2025 Christian Hesse <mail@eworm.de>
|
|
||||||
# https://rsc.eworm.de/COPYING.md
|
|
||||||
#
|
|
||||||
# requires RouterOS, version=7.15
|
|
||||||
#
|
|
||||||
# check for RouterOS health state - temperature plugin
|
|
||||||
# https://rsc.eworm.de/doc/check-health.md
|
|
||||||
|
|
||||||
:global CheckHealthPlugins;
|
|
||||||
|
|
||||||
:set ($CheckHealthPlugins->[ :jobname ]) do={
|
|
||||||
:local FuncName [ :tostr $0 ];
|
|
||||||
|
|
||||||
:global CheckHealthLast;
|
|
||||||
:global CheckHealthTemperature;
|
|
||||||
:global CheckHealthTemperatureDeviation;
|
|
||||||
:global CheckHealthTemperatureNotified;
|
|
||||||
:global Identity;
|
|
||||||
|
|
||||||
:global LogPrint;
|
|
||||||
:global SendNotification2;
|
|
||||||
:global SymbolForNotification;
|
|
||||||
|
|
||||||
:if ([ :len [ /system/health/find where type="C" ] ] = 0) do={
|
|
||||||
$LogPrint debug $FuncName ("Your device does not provide any voltage health values.");
|
|
||||||
:return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
:local TempToNum do={
|
|
||||||
:global CharacterReplace;
|
|
||||||
:local T [ :toarray [ $CharacterReplace $1 "." "," ] ];
|
|
||||||
:return ($T->0 * 10 + $T->1);
|
|
||||||
}
|
|
||||||
|
|
||||||
:if ([ :typeof $CheckHealthTemperatureNotified ] != "array") do={
|
|
||||||
:set CheckHealthTemperatureNotified ({});
|
|
||||||
}
|
|
||||||
|
|
||||||
:foreach Temperature in=[ /system/health/find where type="C" ] do={
|
|
||||||
:local Name [ /system/health/get $Temperature name ];
|
|
||||||
:local Value [ /system/health/get $Temperature value ];
|
|
||||||
|
|
||||||
:if ([ :typeof ($CheckHealthLast->$Name) ] != "nothing") do={
|
|
||||||
:if ([ :typeof ($CheckHealthTemperature->$Name) ] != "num" ) do={
|
|
||||||
$LogPrint info $FuncName ("No threshold given for " . $Name . ", assuming 50C.");
|
|
||||||
:set ($CheckHealthTemperature->$Name) 50;
|
|
||||||
}
|
|
||||||
:local Validate [ /system/health/get [ find where name=$Name ] value ];
|
|
||||||
:while ($Value != $Validate) do={
|
|
||||||
:set Value $Validate;
|
|
||||||
:set Validate [ /system/health/get [ find where name=$Name ] value ];
|
|
||||||
}
|
|
||||||
:if ($Value > $CheckHealthTemperature->$Name && \
|
|
||||||
$CheckHealthTemperatureNotified->$Name != true) do={
|
|
||||||
$SendNotification2 ({ origin=$FuncName; \
|
|
||||||
subject=([ $SymbolForNotification "fire" ] . "Health warning: " . $Name); \
|
|
||||||
message=("The " . $Name . " on " . $Identity . " is above threshold: " . \
|
|
||||||
$Value . "\C2\B0" . "C") });
|
|
||||||
:set ($CheckHealthTemperatureNotified->$Name) true;
|
|
||||||
}
|
|
||||||
:if ($Value <= ($CheckHealthTemperature->$Name - $CheckHealthTemperatureDeviation) && \
|
|
||||||
$CheckHealthTemperatureNotified->$Name = true) do={
|
|
||||||
$SendNotification2 ({ origin=$FuncName; \
|
|
||||||
subject=([ $SymbolForNotification "white-heavy-check-mark" ] . "Health recovery: " . $Name); \
|
|
||||||
message=("The " . $Name . " on " . $Identity . " dropped below threshold: " . \
|
|
||||||
$Value . "\C2\B0" . "C") });
|
|
||||||
:set ($CheckHealthTemperatureNotified->$Name) false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
:set ($CheckHealthLast->$Name) $Value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
#!rsc by RouterOS
|
|
||||||
# RouterOS script: check-health.d/voltage
|
|
||||||
# Copyright (c) 2019-2025 Christian Hesse <mail@eworm.de>
|
|
||||||
# https://rsc.eworm.de/COPYING.md
|
|
||||||
#
|
|
||||||
# requires RouterOS, version=7.15
|
|
||||||
#
|
|
||||||
# check for RouterOS health state - voltage plugin
|
|
||||||
# https://rsc.eworm.de/doc/check-health.md
|
|
||||||
|
|
||||||
:global CheckHealthPlugins;
|
|
||||||
|
|
||||||
:set ($CheckHealthPlugins->[ :jobname ]) do={
|
|
||||||
:local FuncName [ :tostr $0 ];
|
|
||||||
|
|
||||||
:global CheckHealthLast;
|
|
||||||
:global CheckHealthVoltageLow;
|
|
||||||
:global CheckHealthVoltagePercent;
|
|
||||||
:global Identity;
|
|
||||||
|
|
||||||
:global FormatLine;
|
|
||||||
:global IfThenElse;
|
|
||||||
:global LogPrint;
|
|
||||||
:global SendNotification2;
|
|
||||||
:global SymbolForNotification;
|
|
||||||
|
|
||||||
:if ([ :len [ /system/health/find where type="V" ] ] = 0) do={
|
|
||||||
$LogPrint debug $FuncName ("Your device does not provide any voltage health values.");
|
|
||||||
:return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
:foreach Voltage in=[ /system/health/find where type="V" ] do={
|
|
||||||
:local Name [ /system/health/get $Voltage name ];
|
|
||||||
:local Value [ /system/health/get $Voltage value ];
|
|
||||||
|
|
||||||
:if ([ :typeof ($CheckHealthLast->$Name) ] != "nothing") do={
|
|
||||||
:local NumCurr [ $TempToNum $Value ];
|
|
||||||
:local NumLast [ $TempToNum ($CheckHealthLast->$Name) ];
|
|
||||||
|
|
||||||
:if ($NumLast * (100 + $CheckHealthVoltagePercent) < $NumCurr * 100 || \
|
|
||||||
$NumLast * 100 > $NumCurr * (100 + $CheckHealthVoltagePercent)) do={
|
|
||||||
$SendNotification2 ({ origin=$FuncName; \
|
|
||||||
subject=([ $SymbolForNotification ("high-voltage-sign,chart-" . [ $IfThenElse ($NumLast < \
|
|
||||||
$NumCurr) "in" "de" ] . "creasing") ] . "Health warning: " . $Name); \
|
|
||||||
message=("The " . $Name . " on " . $Identity . " jumped more than " . $CheckHealthVoltagePercent . "%.\n\n" . \
|
|
||||||
[ $FormatLine "old value" ($CheckHealthLast->$Name . " V") 12 ] . "\n" . \
|
|
||||||
[ $FormatLine "new value" ($Value . " V") 12 ]) });
|
|
||||||
} else={
|
|
||||||
:if ($NumCurr <= $CheckHealthVoltageLow && $NumLast > $CheckHealthVoltageLow) do={
|
|
||||||
$SendNotification2 ({ origin=$FuncName; \
|
|
||||||
subject=([ $SymbolForNotification "high-voltage-sign,chart-decreasing" ] . "Health warning: Low " . $Name); \
|
|
||||||
message=("The " . $Name . " on " . $Identity . " dropped to " . $Value . " V below hard limit.") });
|
|
||||||
}
|
|
||||||
:if ($NumCurr > $CheckHealthVoltageLow && $NumLast <= $CheckHealthVoltageLow) do={
|
|
||||||
$SendNotification2 ({ origin=$FuncName; \
|
|
||||||
subject=([ $SymbolForNotification "high-voltage-sign,chart-increasing" ] . "Health recovery: Low " . $Name); \
|
|
||||||
message=("The " . $Name . " on " . $Identity . " recovered to " . $Value . " V above hard limit.") });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
:set ($CheckHealthLast->$Name) $Value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
122
check-health.rsc
|
|
@ -1,17 +1,16 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: check-health
|
# RouterOS script: check-health
|
||||||
# Copyright (c) 2019-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2019-2024 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# check for RouterOS health state
|
# check for RouterOS health state
|
||||||
# https://rsc.eworm.de/doc/check-health.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/check-health.md
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -19,6 +18,11 @@
|
||||||
:global CheckHealthCPUUtilizationNotified;
|
:global CheckHealthCPUUtilizationNotified;
|
||||||
:global CheckHealthLast;
|
:global CheckHealthLast;
|
||||||
:global CheckHealthRAMUtilizationNotified;
|
:global CheckHealthRAMUtilizationNotified;
|
||||||
|
:global CheckHealthTemperature;
|
||||||
|
:global CheckHealthTemperatureDeviation;
|
||||||
|
:global CheckHealthTemperatureNotified;
|
||||||
|
:global CheckHealthVoltageLow;
|
||||||
|
:global CheckHealthVoltagePercent;
|
||||||
:global Identity;
|
:global Identity;
|
||||||
|
|
||||||
:global FormatLine;
|
:global FormatLine;
|
||||||
|
|
@ -28,7 +32,6 @@
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
:global SendNotification2;
|
:global SendNotification2;
|
||||||
:global SymbolForNotification;
|
:global SymbolForNotification;
|
||||||
:global ValidateSyntax;
|
|
||||||
|
|
||||||
:local TempToNum do={
|
:local TempToNum do={
|
||||||
:global CharacterReplace;
|
:global CharacterReplace;
|
||||||
|
|
@ -37,7 +40,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -74,37 +76,103 @@
|
||||||
:set CheckHealthRAMUtilizationNotified false;
|
:set CheckHealthRAMUtilizationNotified false;
|
||||||
}
|
}
|
||||||
|
|
||||||
:local Plugins [ /system/script/find where name~"^check-health.d/." ];
|
:if ([ :len [ /system/health/find ] ] = 0) do={
|
||||||
:if ([ :len $Plugins ] = 0) do={
|
$LogPrint debug $ScriptName ("Your device does not provide any health values.");
|
||||||
$LogPrint debug $ScriptName ("No plugins installed.");
|
|
||||||
:set ExitOK true;
|
|
||||||
:error true;
|
:error true;
|
||||||
}
|
}
|
||||||
|
|
||||||
:global CheckHealthPlugins ({});
|
|
||||||
:if ([ :typeof $CheckHealthLast ] != "array") do={
|
:if ([ :typeof $CheckHealthLast ] != "array") do={
|
||||||
:set CheckHealthLast ({});
|
:set CheckHealthLast ({});
|
||||||
}
|
}
|
||||||
|
:if ([ :typeof $CheckHealthTemperatureNotified ] != "array") do={
|
||||||
:foreach Plugin in=$Plugins do={
|
:set CheckHealthTemperatureNotified ({});
|
||||||
:local PluginVal [ /system/script/get $Plugin ];
|
|
||||||
:if ([ $ValidateSyntax ($PluginVal->"source") ] = true) do={
|
|
||||||
:do {
|
|
||||||
/system/script/run $Plugin;
|
|
||||||
} on-error={
|
|
||||||
$LogPrint error $ScriptName ("Plugin '" . $ScriptVal->"name" . "' failed to run.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
:foreach Voltage in=[ /system/health/find where type="V" ] do={
|
||||||
|
:local Name [ /system/health/get $Voltage name ];
|
||||||
|
:local Value [ /system/health/get $Voltage value ];
|
||||||
|
|
||||||
|
:if ([ :typeof ($CheckHealthLast->$Name) ] != "nothing") do={
|
||||||
|
:local NumCurr [ $TempToNum $Value ];
|
||||||
|
:local NumLast [ $TempToNum ($CheckHealthLast->$Name) ];
|
||||||
|
|
||||||
|
:if ($NumLast * (100 + $CheckHealthVoltagePercent) < $NumCurr * 100 || \
|
||||||
|
$NumLast * 100 > $NumCurr * (100 + $CheckHealthVoltagePercent)) do={
|
||||||
|
$SendNotification2 ({ origin=$ScriptName; \
|
||||||
|
subject=([ $SymbolForNotification ("high-voltage-sign,chart-" . [ $IfThenElse ($NumLast < \
|
||||||
|
$NumCurr) "in" "de" ] . "creasing") ] . "Health warning: " . $Name); \
|
||||||
|
message=("The " . $Name . " on " . $Identity . " jumped more than " . $CheckHealthVoltagePercent . "%.\n\n" . \
|
||||||
|
[ $FormatLine "old value" ($CheckHealthLast->$Name . " V") 12 ] . "\n" . \
|
||||||
|
[ $FormatLine "new value" ($Value . " V") 12 ]) });
|
||||||
} else={
|
} else={
|
||||||
$LogPrint error $ScriptName ("Plugin '" . $ScriptVal->"name" . "' failed syntax validation, skipping.");
|
:if ($NumCurr <= $CheckHealthVoltageLow && $NumLast > $CheckHealthVoltageLow) do={
|
||||||
|
$SendNotification2 ({ origin=$ScriptName; \
|
||||||
|
subject=([ $SymbolForNotification "high-voltage-sign,chart-decreasing" ] . "Health warning: Low " . $Name); \
|
||||||
|
message=("The " . $Name . " on " . $Identity . " dropped to " . $Value . " V below hard limit.") });
|
||||||
}
|
}
|
||||||
|
:if ($NumCurr > $CheckHealthVoltageLow && $NumLast <= $CheckHealthVoltageLow) do={
|
||||||
|
$SendNotification2 ({ origin=$ScriptName; \
|
||||||
|
subject=([ $SymbolForNotification "high-voltage-sign,chart-increasing" ] . "Health recovery: Low " . $Name); \
|
||||||
|
message=("The " . $Name . " on " . $Identity . " recovered to " . $Value . " V above hard limit.") });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
:set ($CheckHealthLast->$Name) $Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
:foreach PluginName,Discard in=$CheckHealthPlugins do={
|
:foreach PSU in=[ /system/health/find where name~"^psu.*-state\$" ] do={
|
||||||
($CheckHealthPlugins->$PluginName) \
|
:local Name [ /system/health/get $PSU name ];
|
||||||
("\$CheckHealthPlugins->\"" . $PluginName . "\"");
|
:local Value [ /system/health/get $PSU value ];
|
||||||
|
|
||||||
|
:if ([ :typeof ($CheckHealthLast->$Name) ] != "nothing") do={
|
||||||
|
:if ($CheckHealthLast->$Name = "ok" && \
|
||||||
|
$Value != "ok") do={
|
||||||
|
$SendNotification2 ({ origin=$ScriptName; \
|
||||||
|
subject=([ $SymbolForNotification "cross-mark" ] . "Health warning: " . $Name); \
|
||||||
|
message=("The power supply unit '" . $Name . "' on " . $Identity . " failed!") });
|
||||||
|
}
|
||||||
|
:if ($CheckHealthLast->$Name != "ok" && \
|
||||||
|
$Value = "ok") do={
|
||||||
|
$SendNotification2 ({ origin=$ScriptName; \
|
||||||
|
subject=([ $SymbolForNotification "white-heavy-check-mark" ] . "Health recovery: " . $Name); \
|
||||||
|
message=("The power supply unit '" . $Name . "' on " . $Identity . " recovered!") });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
:set ($CheckHealthLast->$Name) $Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
:set CheckHealthPlugins;
|
:foreach Temperature in=[ /system/health/find where type="C" ] do={
|
||||||
} on-error={
|
:local Name [ /system/health/get $Temperature name ];
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
:local Value [ /system/health/get $Temperature value ];
|
||||||
|
|
||||||
|
:if ([ :typeof ($CheckHealthLast->$Name) ] != "nothing") do={
|
||||||
|
:if ([ :typeof ($CheckHealthTemperature->$Name) ] != "num" ) do={
|
||||||
|
$LogPrint info $ScriptName ("No threshold given for " . $Name . ", assuming 50C.");
|
||||||
|
:set ($CheckHealthTemperature->$Name) 50;
|
||||||
}
|
}
|
||||||
|
:local Validate [ /system/health/get [ find where name=$Name ] value ];
|
||||||
|
:while ($Value != $Validate) do={
|
||||||
|
:set Value $Validate;
|
||||||
|
:set Validate [ /system/health/get [ find where name=$Name ] value ];
|
||||||
|
}
|
||||||
|
:if ($Value > $CheckHealthTemperature->$Name && \
|
||||||
|
$CheckHealthTemperatureNotified->$Name != true) do={
|
||||||
|
$SendNotification2 ({ origin=$ScriptName; \
|
||||||
|
subject=([ $SymbolForNotification "fire" ] . "Health warning: " . $Name); \
|
||||||
|
message=("The " . $Name . " on " . $Identity . " is above threshold: " . \
|
||||||
|
$Value . "\C2\B0" . "C") });
|
||||||
|
:set ($CheckHealthTemperatureNotified->$Name) true;
|
||||||
|
}
|
||||||
|
:if ($Value <= ($CheckHealthTemperature->$Name - $CheckHealthTemperatureDeviation) && \
|
||||||
|
$CheckHealthTemperatureNotified->$Name = true) do={
|
||||||
|
$SendNotification2 ({ origin=$ScriptName; \
|
||||||
|
subject=([ $SymbolForNotification "white-heavy-check-mark" ] . "Health recovery: " . $Name); \
|
||||||
|
message=("The " . $Name . " on " . $Identity . " dropped below threshold: " . \
|
||||||
|
$Value . "\C2\B0" . "C") });
|
||||||
|
:set ($CheckHealthTemperatureNotified->$Name) false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
:set ($CheckHealthLast->$Name) $Value;
|
||||||
|
}
|
||||||
|
} on-error={ }
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,16 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: check-lte-firmware-upgrade
|
# RouterOS script: check-lte-firmware-upgrade
|
||||||
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# check for LTE firmware upgrade, send notification
|
# check for LTE firmware upgrade, send notification
|
||||||
# https://rsc.eworm.de/doc/check-lte-firmware-upgrade.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/check-lte-firmware-upgrade.md
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -20,7 +19,6 @@
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -102,6 +100,4 @@
|
||||||
:foreach Interface in=[ /interface/lte/find ] do={
|
:foreach Interface in=[ /interface/lte/find ] do={
|
||||||
$CheckInterface $ScriptName $Interface;
|
$CheckInterface $ScriptName $Interface;
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,16 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: check-routeros-update
|
# RouterOS script: check-routeros-update
|
||||||
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
# requires device-mode, fetch, scheduler
|
|
||||||
#
|
#
|
||||||
# check for RouterOS update, send notification and/or install
|
# check for RouterOS update, send notification and/or install
|
||||||
# https://rsc.eworm.de/doc/check-routeros-update.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/check-routeros-update.md
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -36,85 +34,38 @@
|
||||||
:global WaitFullyConnected;
|
:global WaitFullyConnected;
|
||||||
|
|
||||||
:local DoUpdate do={
|
:local DoUpdate do={
|
||||||
:local ScriptName [ :tostr $1 ];
|
|
||||||
|
|
||||||
:global LogPrint;
|
|
||||||
|
|
||||||
:if ([ :len [ /system/script/find where name="packages-update" ] ] > 0) do={
|
:if ([ :len [ /system/script/find where name="packages-update" ] ] > 0) do={
|
||||||
/system/script/run packages-update;
|
/system/script/run packages-update;
|
||||||
} else={
|
} else={
|
||||||
/system/package/update/install without-paging;
|
/system/package/update/install without-paging;
|
||||||
}
|
}
|
||||||
$LogPrint info $ScriptName ("Waiting for system to reboot.");
|
:error "Waiting for system to reboot.";
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ :len [ /system/scheduler/find where name="running-from-backup-partition" ] ] > 0) do={
|
|
||||||
$LogPrint warning $ScriptName ("Running from backup partition, refusing to act.");
|
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$WaitFullyConnected;
|
$WaitFullyConnected;
|
||||||
|
|
||||||
:if ([ :len [ /system/scheduler/find where name="_RebootForUpdate" ] ] > 0) do={
|
:if ([ :len [ /system/scheduler/find where name="_RebootForUpdate" ] ] > 0) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error "A reboot for update is already scheduled.";
|
:error "A reboot for update is already scheduled.";
|
||||||
}
|
}
|
||||||
|
|
||||||
:local License [ /system/license/get ];
|
|
||||||
:if ([ :typeof ($License->"deadline-at") ] = "str") do={
|
|
||||||
:if ([ :len ($License->"next-renewal-at") ] = 0 && ($License->"limited-upgrades") = true) do={
|
|
||||||
$LogPrint warning $ScriptName ("Your license expired on " . ($License->"deadline-at") . "!");
|
|
||||||
$SendNotification2 ({ origin=$ScriptName; \
|
|
||||||
subject=([ $SymbolForNotification "warning-sign" ] . "License expired!"); \
|
|
||||||
message=("Your license expired on " . ($License->"deadline-at") . \
|
|
||||||
", can no longer update RouterOS on " . $Identity . "...") });
|
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
|
||||||
}
|
|
||||||
|
|
||||||
:if ([ :totime ($License->"deadline-at") ] - 3w < [ :timestamp ]) do={
|
|
||||||
$LogPrint warning $ScriptName ("Your license will expire on " . ($License->"deadline-at") . "!");
|
|
||||||
$SendNotification2 ({ origin=$ScriptName; \
|
|
||||||
subject=([ $SymbolForNotification "warning-sign" ] . "License about to expire!"); \
|
|
||||||
message=("Your license failed to renew and is about to expire on " . \
|
|
||||||
($License->"deadline-at") . " on " . $Identity . "...") });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$LogPrint debug $ScriptName ("Checking for updates...");
|
$LogPrint debug $ScriptName ("Checking for updates...");
|
||||||
/system/package/update/check-for-updates without-paging as-value;
|
/system/package/update/check-for-updates without-paging as-value;
|
||||||
:local Update [ /system/package/update/get ];
|
:local Update [ /system/package/update/get ];
|
||||||
|
|
||||||
:if (($Update->"installed-version") = ($Update->"latest-version")) do={
|
:if ([ $ScriptFromTerminal $ScriptName ] = true && ($Update->"installed-version") = ($Update->"latest-version")) do={
|
||||||
:if ([ $ScriptFromTerminal $ScriptName ] = true) do={
|
|
||||||
$LogPrint info $ScriptName ("System is already up to date.");
|
$LogPrint info $ScriptName ("System is already up to date.");
|
||||||
}
|
|
||||||
:set ExitOK true;
|
|
||||||
:error true;
|
:error true;
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ :len ($Update->"latest-version") ] = 0) do={
|
|
||||||
$LogPrint info $ScriptName ("Received an empty version string from server.");
|
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
|
||||||
}
|
|
||||||
|
|
||||||
:local NumInstalled [ $VersionToNum ($Update->"installed-version") ];
|
:local NumInstalled [ $VersionToNum ($Update->"installed-version") ];
|
||||||
:local NumLatest [ $VersionToNum ($Update->"latest-version") ];
|
:local NumLatest [ $VersionToNum ($Update->"latest-version") ];
|
||||||
:local BitMask [ $VersionToNum "255.255zero0" ];
|
|
||||||
:local NumInstalledFeature ($NumInstalled & $BitMask);
|
|
||||||
:local NumLatestFeature ($NumLatest & $BitMask);
|
|
||||||
:local Link ("https://mikrotik.com/download/changelogs/" . $Update->"channel" . "-release-tree");
|
:local Link ("https://mikrotik.com/download/changelogs/" . $Update->"channel" . "-release-tree");
|
||||||
|
|
||||||
:if ($NumLatest < [ $VersionToNum "7.0" ]) do={
|
:if ($NumLatest < 117505792) do={
|
||||||
$LogPrint warning $ScriptName ("The version '" . ($Update->"latest-version") . "' is not a valid version.");
|
$LogPrint info $ScriptName ("The version '" . ($Update->"latest-version") . "' is not a valid version.");
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -126,20 +77,16 @@
|
||||||
subject=([ $SymbolForNotification "sparkles" ] . "RouterOS update: " . $Update->"latest-version"); \
|
subject=([ $SymbolForNotification "sparkles" ] . "RouterOS update: " . $Update->"latest-version"); \
|
||||||
message=("Installing ALL versions automatically, including " . $Update->"latest-version" . \
|
message=("Installing ALL versions automatically, including " . $Update->"latest-version" . \
|
||||||
"... Updating on " . $Identity . "..."); link=$Link; silent=true });
|
"... Updating on " . $Identity . "..."); link=$Link; silent=true });
|
||||||
$DoUpdate $ScriptName;
|
$DoUpdate;
|
||||||
:set ExitOK true;
|
|
||||||
:error true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ($SafeUpdatePatch = true && $NumInstalledFeature = $NumLatestFeature) do={
|
:if ($SafeUpdatePatch = true && ($NumInstalled & 0xffff0000) = ($NumLatest & 0xffff0000)) do={
|
||||||
$LogPrint info $ScriptName ("Version " . $Update->"latest-version" . " is a patch release, updating...");
|
$LogPrint info $ScriptName ("Version " . $Update->"latest-version" . " is a patch release, updating...");
|
||||||
$SendNotification2 ({ origin=$ScriptName; \
|
$SendNotification2 ({ origin=$ScriptName; \
|
||||||
subject=([ $SymbolForNotification "sparkles" ] . "RouterOS update: " . $Update->"latest-version"); \
|
subject=([ $SymbolForNotification "sparkles" ] . "RouterOS update: " . $Update->"latest-version"); \
|
||||||
message=("Version " . $Update->"latest-version" . " is a patch update for " . $Update->"channel" . \
|
message=("Version " . $Update->"latest-version" . " is a patch update for " . $Update->"channel" . \
|
||||||
", updating on " . $Identity . "..."); link=$Link; silent=true });
|
", updating on " . $Identity . "..."); link=$Link; silent=true });
|
||||||
$DoUpdate $ScriptName;
|
$DoUpdate;
|
||||||
:set ExitOK true;
|
|
||||||
:error true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ($SafeUpdateNeighbor = true) do={
|
:if ($SafeUpdateNeighbor = true) do={
|
||||||
|
|
@ -153,9 +100,7 @@
|
||||||
subject=([ $SymbolForNotification "sparkles" ] . "RouterOS update: " . $Update->"latest-version"); \
|
subject=([ $SymbolForNotification "sparkles" ] . "RouterOS update: " . $Update->"latest-version"); \
|
||||||
message=("Seen a neighbor (" . $Neighbor . ") running version " . $Update->"latest-version" . \
|
message=("Seen a neighbor (" . $Neighbor . ") running version " . $Update->"latest-version" . \
|
||||||
" from " . $Update->"channel" . ", updating on " . $Identity . "..."); link=$Link; silent=true });
|
" from " . $Update->"channel" . ", updating on " . $Identity . "..."); link=$Link; silent=true });
|
||||||
$DoUpdate $ScriptName;
|
$DoUpdate;
|
||||||
:set ExitOK true;
|
|
||||||
:error true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -175,28 +120,14 @@
|
||||||
subject=([ $SymbolForNotification "sparkles" ] . "RouterOS update: " . $Update->"latest-version"); \
|
subject=([ $SymbolForNotification "sparkles" ] . "RouterOS update: " . $Update->"latest-version"); \
|
||||||
message=("Version " . $Update->"latest-version" . " is considered safe for " . $Update->"channel" . \
|
message=("Version " . $Update->"latest-version" . " is considered safe for " . $Update->"channel" . \
|
||||||
", updating on " . $Identity . "..."); link=$Link; silent=true });
|
", updating on " . $Identity . "..."); link=$Link; silent=true });
|
||||||
$DoUpdate $ScriptName;
|
$DoUpdate;
|
||||||
:set ExitOK true;
|
|
||||||
:error true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ $ScriptFromTerminal $ScriptName ] = true) do={
|
:if ([ $ScriptFromTerminal $ScriptName ] = true) do={
|
||||||
:if (($Update->"channel") = "testing" && $NumInstalledFeature < $NumLatestFeature) do={
|
|
||||||
:put ("This is a feature update in testing channel. Switch to channel 'stable'? [y/N]");
|
|
||||||
:if (([ /terminal/inkey timeout=60 ] % 32) = 25) do={
|
|
||||||
/system/package/update/set channel=stable;
|
|
||||||
$LogPrint info $ScriptName ("Switched to channel 'stable', please re-run!");
|
|
||||||
:set ExitOK true;
|
|
||||||
:error true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
:put ("Do you want to install RouterOS version " . $Update->"latest-version" . "? [y/N]");
|
:put ("Do you want to install RouterOS version " . $Update->"latest-version" . "? [y/N]");
|
||||||
:if (([ /terminal/inkey timeout=60 ] % 32) = 25) do={
|
:if (([ /terminal/inkey timeout=60 ] % 32) = 25) do={
|
||||||
$DoUpdate $ScriptName;
|
$DoUpdate;
|
||||||
:set ExitOK true;
|
|
||||||
:error true;
|
|
||||||
} else={
|
} else={
|
||||||
:put "Canceled...";
|
:put "Canceled...";
|
||||||
}
|
}
|
||||||
|
|
@ -205,7 +136,6 @@
|
||||||
:if ($SentRouterosUpdateNotification = $Update->"latest-version") do={
|
:if ($SentRouterosUpdateNotification = $Update->"latest-version") do={
|
||||||
$LogPrint info $ScriptName ("Already sent the RouterOS update notification for version " . \
|
$LogPrint info $ScriptName ("Already sent the RouterOS update notification for version " . \
|
||||||
$Update->"latest-version" . ".");
|
$Update->"latest-version" . ".");
|
||||||
:set ExitOK true;
|
|
||||||
:error true;
|
:error true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -221,7 +151,6 @@
|
||||||
:if ($SentRouterosUpdateNotification = $Update->"latest-version") do={
|
:if ($SentRouterosUpdateNotification = $Update->"latest-version") do={
|
||||||
$LogPrint info $ScriptName ("Already sent the RouterOS downgrade notification for version " . \
|
$LogPrint info $ScriptName ("Already sent the RouterOS downgrade notification for version " . \
|
||||||
$Update->"latest-version" . ".");
|
$Update->"latest-version" . ".");
|
||||||
:set ExitOK true;
|
|
||||||
:error true;
|
:error true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -234,6 +163,4 @@
|
||||||
" is available for downgrade.");
|
" is available for downgrade.");
|
||||||
:set SentRouterosUpdateNotification ($Update->"latest-version");
|
:set SentRouterosUpdateNotification ($Update->"latest-version");
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,19 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: collect-wireless-mac.capsman
|
# RouterOS script: collect-wireless-mac.capsman
|
||||||
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: lease-script, order=40
|
# provides: lease-script, order=40
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# collect wireless mac adresses in access list
|
# collect wireless mac adresses in access list
|
||||||
# https://rsc.eworm.de/doc/collect-wireless-mac.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/collect-wireless-mac.md
|
||||||
#
|
#
|
||||||
# !! Do not edit this file, it is generated from template!
|
# !! Do not edit this file, it is generated from template!
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -30,7 +29,6 @@
|
||||||
:global SymbolForNotification;
|
:global SymbolForNotification;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName 10 ] = false) do={
|
:if ([ $ScriptLock $ScriptName 10 ] = false) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -95,6 +93,4 @@
|
||||||
$LogPrint debug $ScriptName ("No mac address available... Ignoring.");
|
$LogPrint debug $ScriptName ("No mac address available... Ignoring.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,19 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: collect-wireless-mac.local
|
# RouterOS script: collect-wireless-mac.local
|
||||||
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: lease-script, order=40
|
# provides: lease-script, order=40
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# collect wireless mac adresses in access list
|
# collect wireless mac adresses in access list
|
||||||
# https://rsc.eworm.de/doc/collect-wireless-mac.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/collect-wireless-mac.md
|
||||||
#
|
#
|
||||||
# !! Do not edit this file, it is generated from template!
|
# !! Do not edit this file, it is generated from template!
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -30,7 +29,6 @@
|
||||||
:global SymbolForNotification;
|
:global SymbolForNotification;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName 10 ] = false) do={
|
:if ([ $ScriptLock $ScriptName 10 ] = false) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -96,6 +94,4 @@
|
||||||
$LogPrint debug $ScriptName ("No mac address available... Ignoring.");
|
$LogPrint debug $ScriptName ("No mac address available... Ignoring.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: collect-wireless-mac%TEMPL%
|
# RouterOS script: collect-wireless-mac%TEMPL%
|
||||||
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: lease-script, order=40
|
# provides: lease-script, order=40
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# collect wireless mac adresses in access list
|
# collect wireless mac adresses in access list
|
||||||
# https://rsc.eworm.de/doc/collect-wireless-mac.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/collect-wireless-mac.md
|
||||||
#
|
#
|
||||||
# !! This is just a template to generate the real script!
|
# !! This is just a template to generate the real script!
|
||||||
# !! Pattern '%TEMPL%' is replaced, paths are filtered.
|
# !! Pattern '%TEMPL%' is replaced, paths are filtered.
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -31,7 +30,6 @@
|
||||||
:global SymbolForNotification;
|
:global SymbolForNotification;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName 10 ] = false) do={
|
:if ([ $ScriptLock $ScriptName 10 ] = false) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -113,6 +111,4 @@
|
||||||
$LogPrint debug $ScriptName ("No mac address available... Ignoring.");
|
$LogPrint debug $ScriptName ("No mac address available... Ignoring.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,19 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: collect-wireless-mac.wifi
|
# RouterOS script: collect-wireless-mac.wifi
|
||||||
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: lease-script, order=40
|
# provides: lease-script, order=40
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# collect wireless mac adresses in access list
|
# collect wireless mac adresses in access list
|
||||||
# https://rsc.eworm.de/doc/collect-wireless-mac.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/collect-wireless-mac.md
|
||||||
#
|
#
|
||||||
# !! Do not edit this file, it is generated from template!
|
# !! Do not edit this file, it is generated from template!
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -30,7 +29,6 @@
|
||||||
:global SymbolForNotification;
|
:global SymbolForNotification;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName 10 ] = false) do={
|
:if ([ $ScriptLock $ScriptName 10 ] = false) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -95,6 +93,4 @@
|
||||||
$LogPrint debug $ScriptName ("No mac address available... Ignoring.");
|
$LogPrint debug $ScriptName ("No mac address available... Ignoring.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,19 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: daily-psk.capsman
|
# RouterOS script: daily-psk.capsman
|
||||||
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
|
||||||
# Michael Gisbers <michael@gisbers.de>
|
# Michael Gisbers <michael@gisbers.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# update daily PSK (pre shared key)
|
# update daily PSK (pre shared key)
|
||||||
# https://rsc.eworm.de/doc/daily-psk.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/daily-psk.md
|
||||||
#
|
#
|
||||||
# !! Do not edit this file, it is generated from template!
|
# !! Do not edit this file, it is generated from template!
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -24,6 +23,7 @@
|
||||||
|
|
||||||
:global FormatLine;
|
:global FormatLine;
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
|
:global RequiredRouterOS;
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
:global SendNotification2;
|
:global SendNotification2;
|
||||||
:global SymbolForNotification;
|
:global SymbolForNotification;
|
||||||
|
|
@ -32,7 +32,6 @@
|
||||||
:global WaitFullyConnected;
|
:global WaitFullyConnected;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
$WaitFullyConnected;
|
$WaitFullyConnected;
|
||||||
|
|
@ -91,6 +90,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,19 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: daily-psk.local
|
# RouterOS script: daily-psk.local
|
||||||
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
|
||||||
# Michael Gisbers <michael@gisbers.de>
|
# Michael Gisbers <michael@gisbers.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# update daily PSK (pre shared key)
|
# update daily PSK (pre shared key)
|
||||||
# https://rsc.eworm.de/doc/daily-psk.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/daily-psk.md
|
||||||
#
|
#
|
||||||
# !! Do not edit this file, it is generated from template!
|
# !! Do not edit this file, it is generated from template!
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -24,6 +23,7 @@
|
||||||
|
|
||||||
:global FormatLine;
|
:global FormatLine;
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
|
:global RequiredRouterOS;
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
:global SendNotification2;
|
:global SendNotification2;
|
||||||
:global SymbolForNotification;
|
:global SymbolForNotification;
|
||||||
|
|
@ -32,7 +32,6 @@
|
||||||
:global WaitFullyConnected;
|
:global WaitFullyConnected;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
$WaitFullyConnected;
|
$WaitFullyConnected;
|
||||||
|
|
@ -90,6 +89,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: daily-psk%TEMPL%
|
# RouterOS script: daily-psk%TEMPL%
|
||||||
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
|
||||||
# Michael Gisbers <michael@gisbers.de>
|
# Michael Gisbers <michael@gisbers.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# update daily PSK (pre shared key)
|
# update daily PSK (pre shared key)
|
||||||
# https://rsc.eworm.de/doc/daily-psk.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/daily-psk.md
|
||||||
#
|
#
|
||||||
# !! This is just a template to generate the real script!
|
# !! This is just a template to generate the real script!
|
||||||
# !! Pattern '%TEMPL%' is replaced, paths are filtered.
|
# !! Pattern '%TEMPL%' is replaced, paths are filtered.
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -25,6 +24,7 @@
|
||||||
|
|
||||||
:global FormatLine;
|
:global FormatLine;
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
|
:global RequiredRouterOS;
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
:global SendNotification2;
|
:global SendNotification2;
|
||||||
:global SymbolForNotification;
|
:global SymbolForNotification;
|
||||||
|
|
@ -33,7 +33,6 @@
|
||||||
:global WaitFullyConnected;
|
:global WaitFullyConnected;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
$WaitFullyConnected;
|
$WaitFullyConnected;
|
||||||
|
|
@ -87,7 +86,7 @@
|
||||||
/interface/wireless/access-list/set $AccList private-pre-shared-key=$NewPsk;
|
/interface/wireless/access-list/set $AccList private-pre-shared-key=$NewPsk;
|
||||||
|
|
||||||
:if ([ :len [ /caps-man/actual-interface-configuration/find where configuration.ssid=$Ssid !disabled ] ] > 0) do={
|
:if ([ :len [ /caps-man/actual-interface-configuration/find where configuration.ssid=$Ssid !disabled ] ] > 0) do={
|
||||||
:if ([ :len [ /interface/wifi/find where configuration.ssid=$Ssid !disabled ] ] > 0) do={
|
:if ([ $RequiredRouterOS $ScriptName "7.15beta8" false ] = false || [ :len [ /interface/wifi/find where configuration.ssid=$Ssid !disabled ] ] > 0) do={
|
||||||
:if ([ :len [ /interface/wireless/find where name=$IntName !disabled ] ] = 1) do={
|
:if ([ :len [ /interface/wireless/find where name=$IntName !disabled ] ] = 1) do={
|
||||||
:if ($Seen->$Ssid = 1) do={
|
:if ($Seen->$Ssid = 1) do={
|
||||||
$LogPrint debug $ScriptName ("Already sent a mail for SSID " . $Ssid . ", skipping.");
|
$LogPrint debug $ScriptName ("Already sent a mail for SSID " . $Ssid . ", skipping.");
|
||||||
|
|
@ -106,6 +105,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,19 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: daily-psk.wifi
|
# RouterOS script: daily-psk.wifi
|
||||||
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
|
||||||
# Michael Gisbers <michael@gisbers.de>
|
# Michael Gisbers <michael@gisbers.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# update daily PSK (pre shared key)
|
# update daily PSK (pre shared key)
|
||||||
# https://rsc.eworm.de/doc/daily-psk.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/daily-psk.md
|
||||||
#
|
#
|
||||||
# !! Do not edit this file, it is generated from template!
|
# !! Do not edit this file, it is generated from template!
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -24,6 +23,7 @@
|
||||||
|
|
||||||
:global FormatLine;
|
:global FormatLine;
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
|
:global RequiredRouterOS;
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
:global SendNotification2;
|
:global SendNotification2;
|
||||||
:global SymbolForNotification;
|
:global SymbolForNotification;
|
||||||
|
|
@ -32,7 +32,6 @@
|
||||||
:global WaitFullyConnected;
|
:global WaitFullyConnected;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
$WaitFullyConnected;
|
$WaitFullyConnected;
|
||||||
|
|
@ -73,7 +72,7 @@
|
||||||
$LogPrint info $ScriptName ("Updating daily PSK for '" . $Ssid . "' to '" . $NewPsk . "' (was '" . $OldPsk . "')");
|
$LogPrint info $ScriptName ("Updating daily PSK for '" . $Ssid . "' to '" . $NewPsk . "' (was '" . $OldPsk . "')");
|
||||||
/interface/wifi/access-list/set $AccList passphrase=$NewPsk;
|
/interface/wifi/access-list/set $AccList passphrase=$NewPsk;
|
||||||
|
|
||||||
:if ([ :len [ /interface/wifi/find where configuration.ssid=$Ssid !disabled ] ] > 0) do={
|
:if ([ $RequiredRouterOS $ScriptName "7.15beta8" false ] = false || [ :len [ /interface/wifi/find where configuration.ssid=$Ssid !disabled ] ] > 0) do={
|
||||||
:if ($Seen->$Ssid = 1) do={
|
:if ($Seen->$Ssid = 1) do={
|
||||||
$LogPrint debug $ScriptName ("Already sent a mail for SSID " . $Ssid . ", skipping.");
|
$LogPrint debug $ScriptName ("Already sent a mail for SSID " . $Ssid . ", skipping.");
|
||||||
} else={
|
} else={
|
||||||
|
|
@ -91,6 +90,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,19 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: dhcp-lease-comment.capsman
|
# RouterOS script: dhcp-lease-comment.capsman
|
||||||
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: lease-script, order=60
|
# provides: lease-script, order=60
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# update dhcp-server lease comment with infos from access-list
|
# update dhcp-server lease comment with infos from access-list
|
||||||
# https://rsc.eworm.de/doc/dhcp-lease-comment.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/dhcp-lease-comment.md
|
||||||
#
|
#
|
||||||
# !! Do not edit this file, it is generated from template!
|
# !! Do not edit this file, it is generated from template!
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -22,7 +21,6 @@
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -38,6 +36,4 @@
|
||||||
/ip/dhcp-server/lease/set comment=$NewComment $Lease;
|
/ip/dhcp-server/lease/set comment=$NewComment $Lease;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,19 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: dhcp-lease-comment.local
|
# RouterOS script: dhcp-lease-comment.local
|
||||||
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: lease-script, order=60
|
# provides: lease-script, order=60
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# update dhcp-server lease comment with infos from access-list
|
# update dhcp-server lease comment with infos from access-list
|
||||||
# https://rsc.eworm.de/doc/dhcp-lease-comment.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/dhcp-lease-comment.md
|
||||||
#
|
#
|
||||||
# !! Do not edit this file, it is generated from template!
|
# !! Do not edit this file, it is generated from template!
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -22,7 +21,6 @@
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -38,6 +36,4 @@
|
||||||
/ip/dhcp-server/lease/set comment=$NewComment $Lease;
|
/ip/dhcp-server/lease/set comment=$NewComment $Lease;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: dhcp-lease-comment%TEMPL%
|
# RouterOS script: dhcp-lease-comment%TEMPL%
|
||||||
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: lease-script, order=60
|
# provides: lease-script, order=60
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# update dhcp-server lease comment with infos from access-list
|
# update dhcp-server lease comment with infos from access-list
|
||||||
# https://rsc.eworm.de/doc/dhcp-lease-comment.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/dhcp-lease-comment.md
|
||||||
#
|
#
|
||||||
# !! This is just a template to generate the real script!
|
# !! This is just a template to generate the real script!
|
||||||
# !! Pattern '%TEMPL%' is replaced, paths are filtered.
|
# !! Pattern '%TEMPL%' is replaced, paths are filtered.
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -23,7 +22,6 @@
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -43,6 +41,4 @@
|
||||||
/ip/dhcp-server/lease/set comment=$NewComment $Lease;
|
/ip/dhcp-server/lease/set comment=$NewComment $Lease;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,19 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: dhcp-lease-comment.wifi
|
# RouterOS script: dhcp-lease-comment.wifi
|
||||||
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: lease-script, order=60
|
# provides: lease-script, order=60
|
||||||
# requires RouterOS, version=7.15
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# update dhcp-server lease comment with infos from access-list
|
# update dhcp-server lease comment with infos from access-list
|
||||||
# https://rsc.eworm.de/doc/dhcp-lease-comment.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/dhcp-lease-comment.md
|
||||||
#
|
#
|
||||||
# !! Do not edit this file, it is generated from template!
|
# !! Do not edit this file, it is generated from template!
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -22,7 +21,6 @@
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -38,6 +36,4 @@
|
||||||
/ip/dhcp-server/lease/set comment=$NewComment $Lease;
|
/ip/dhcp-server/lease/set comment=$NewComment $Lease;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,17 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: dhcp-to-dns
|
# RouterOS script: dhcp-to-dns
|
||||||
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2024 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: lease-script, order=20
|
# provides: lease-script, order=20
|
||||||
# requires RouterOS, version=7.16
|
# requires RouterOS, version=7.13
|
||||||
#
|
#
|
||||||
# check DHCP leases and add/remove/update DNS entries
|
# check DHCP leases and add/remove/update DNS entries
|
||||||
# https://rsc.eworm.de/doc/dhcp-to-dns.md
|
# https://git.eworm.de/cgit/routeros-scripts/about/doc/dhcp-to-dns.md
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:do {
|
:do {
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
|
|
@ -28,7 +27,6 @@
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName 10 ] = false) do={
|
:if ([ $ScriptLock $ScriptName 10 ] = false) do={
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -42,7 +40,7 @@
|
||||||
}
|
}
|
||||||
:local PlaceBefore ([ /ip/dns/static/find where (name=$CommentString or (comment=$CommentString and name=-)) type=NXDOMAIN disabled ]->0);
|
:local PlaceBefore ([ /ip/dns/static/find where (name=$CommentString or (comment=$CommentString and name=-)) type=NXDOMAIN disabled ]->0);
|
||||||
|
|
||||||
:foreach DnsRecord in=[ /ip/dns/static/find where comment~("^" . $CommentPrefix . "\\b") type=A ] do={
|
:foreach DnsRecord in=[ /ip/dns/static/find where comment~("^" . $CommentPrefix . "\\b") (!type or type=A) ] do={
|
||||||
:local DnsRecordVal [ /ip/dns/static/get $DnsRecord ];
|
:local DnsRecordVal [ /ip/dns/static/get $DnsRecord ];
|
||||||
:local DnsRecordInfo [ $ParseKeyValueStore ($DnsRecordVal->"comment") ];
|
:local DnsRecordInfo [ $ParseKeyValueStore ($DnsRecordVal->"comment") ];
|
||||||
:local MacInServer ($DnsRecordInfo->"macaddress" . " in " . $DnsRecordInfo->"server");
|
:local MacInServer ($DnsRecordInfo->"macaddress" . " in " . $DnsRecordInfo->"server");
|
||||||
|
|
@ -85,7 +83,7 @@
|
||||||
:local FullCN ($HostName . "." . $NetDomain);
|
:local FullCN ($HostName . "." . $NetDomain);
|
||||||
:local MacInServer ($LeaseVal->"active-mac-address" . " in " . $LeaseVal->"server");
|
:local MacInServer ($LeaseVal->"active-mac-address" . " in " . $LeaseVal->"server");
|
||||||
|
|
||||||
:local DnsRecord [ /ip/dns/static/find where comment=$Comment type=A ];
|
:local DnsRecord [ /ip/dns/static/find where comment=$Comment (!type or type=A) ];
|
||||||
:if ([ :len $DnsRecord ] > 0) do={
|
:if ([ :len $DnsRecord ] > 0) do={
|
||||||
:local DnsRecordVal [ /ip/dns/static/get $DnsRecord ];
|
:local DnsRecordVal [ /ip/dns/static/get $DnsRecord ];
|
||||||
|
|
||||||
|
|
@ -118,13 +116,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ :len [ /ip/dns/static/find where name=$FullA type=A ] ] > 1) do={
|
:if ([ :len [ /ip/dns/static/find where name=$FullA (!type or type=A) ] ] > 1) do={
|
||||||
$LogPrintOnce warning $ScriptName ("The name '" . $FullA . "' appeared in more than one A record!");
|
$LogPrintOnce warning $ScriptName ("The name '" . $FullA . "' appeared in more than one A record!");
|
||||||
}
|
}
|
||||||
} else={
|
} else={
|
||||||
$LogPrint debug $ScriptName ("No address available... Ignoring.");
|
$LogPrint debug $ScriptName ("No address available... Ignoring.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={ }
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Find and remove access list duplicates
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Upload backup to Mikrotik cloud
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Send backup via e-mail
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Save configuration to fallback partition
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Upload backup to server
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Download packages for CAP upgrade from CAPsMAN
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Run rolling CAP upgrades from CAPsMAN
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Renew locally issued certificates
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Renew certificates and notify on expiration
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
|
@ -4,7 +4,7 @@ Notify about health state
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
@ -17,24 +17,22 @@ Description
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
This script is run from scheduler periodically, sending notification on
|
This script is run from scheduler periodically, sending notification on
|
||||||
health related events. Monitoring CPU and RAM utilization (available
|
health related events:
|
||||||
processing and memory resources) works on all devices:
|
|
||||||
|
|
||||||
* high CPU utilization
|
* high CPU utilization
|
||||||
* high RAM utilization (low available RAM)
|
* high RAM utilization (low available RAM)
|
||||||
|
|
||||||
With additional plugins functionality can be extended, depending on
|
|
||||||
sensors available in hardware:
|
|
||||||
|
|
||||||
* voltage jumps up or down more than configured threshold
|
* voltage jumps up or down more than configured threshold
|
||||||
* voltage drops below hard lower limit
|
* voltage drops below hard lower limit
|
||||||
* fan failed or recovered
|
|
||||||
* power supply failed or recovered
|
* power supply failed or recovered
|
||||||
* temperature is above or below threshold
|
* temperature is above or below threshold
|
||||||
|
|
||||||
> ⚠️ **Warning**: Note that bad initial state will not trigger an event! For
|
Note that bad initial state will not trigger an event.
|
||||||
> example rebooting a device that is already too hot will not trigger an
|
|
||||||
> alert on high temperature.
|
Monitoring CPU and RAM utilization (available processing and memory
|
||||||
|
resources) works on all devices. Other than that only sensors available
|
||||||
|
in hardware can be checked. See what your hardware supports:
|
||||||
|
|
||||||
|
/system/health/print;
|
||||||
|
|
||||||
### Sample notifications
|
### Sample notifications
|
||||||
|
|
||||||
|
|
@ -59,8 +57,8 @@ sensors available in hardware:
|
||||||
|
|
||||||
#### PSU state
|
#### PSU state
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
Requirements and installation
|
Requirements and installation
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
@ -74,30 +72,6 @@ Just install the script and create a scheduler:
|
||||||
> precision of cpu utilization, escpecially on devices with limited
|
> precision of cpu utilization, escpecially on devices with limited
|
||||||
> resources. Thus an unusual interval is used here.
|
> resources. Thus an unusual interval is used here.
|
||||||
|
|
||||||
### Plugins
|
|
||||||
|
|
||||||
Additional plugins are available for sensors available in hardware. First
|
|
||||||
check what your hardware supports:
|
|
||||||
|
|
||||||
/system/health/print;
|
|
||||||
|
|
||||||
Then install the plugin for *fan* and *power supply unit* *state*:
|
|
||||||
|
|
||||||
$ScriptInstallUpdate check-health,check-health.d/state;
|
|
||||||
|
|
||||||
... or *temperature*:
|
|
||||||
|
|
||||||
$ScriptInstallUpdate check-health,check-health.d/temperature;
|
|
||||||
|
|
||||||
... or *voltage*:
|
|
||||||
|
|
||||||
$ScriptInstallUpdate check-health,check-health.d/voltage;
|
|
||||||
|
|
||||||
You can also combine the commands and install all or a subset of plugins
|
|
||||||
in one go:
|
|
||||||
|
|
||||||
$ScriptInstallUpdate check-health,check-health.d/state,check-health.d/temperature,check-health.d/voltage;
|
|
||||||
|
|
||||||
Configuration
|
Configuration
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Notify on LTE firmware upgrade
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Notify on RouterOS update
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Collect MAC addresses in wireless access list
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Use wireless network with daily psk
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Comment DHCP leases with info from access list
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Create DNS records for DHCP leases
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Automatically upgrade firmware and reboot
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Download, import and update firewall address-lists
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
@ -18,11 +18,10 @@ Description
|
||||||
|
|
||||||
This script downloads, imports and updates firewall address-lists. Its main
|
This script downloads, imports and updates firewall address-lists. Its main
|
||||||
purpose is to block attacking ip addresses, spam hosts, command-and-control
|
purpose is to block attacking ip addresses, spam hosts, command-and-control
|
||||||
servers and similar malicious entities. The default configuration contains a
|
servers and similar malicious entities. The default configuration contains
|
||||||
[collective list by GitHub user @stamparm](https://github.com/stamparm/ipsum),
|
lists from [abuse.ch](https://abuse.ch/), [dshield.org](https://dshield.org/)
|
||||||
lists from [dshield.org](https://dshield.org/) and
|
and [blocklist.de](https://www.blocklist.de/), and
|
||||||
[blocklist.de](https://www.blocklist.de/), and lists from
|
lists from [spamhaus.org](https://spamhaus.org/) are prepared.
|
||||||
[spamhaus.org](https://spamhaus.org/) are prepared.
|
|
||||||
|
|
||||||
The address-lists are updated in place, so after initial import you will not
|
The address-lists are updated in place, so after initial import you will not
|
||||||
see situation when the lists are not populated.
|
see situation when the lists are not populated.
|
||||||
|
|
@ -63,8 +62,9 @@ The configuration goes to `global-config-overlay`, these are the parameters:
|
||||||
> your local `global-config-overlay` and modify it to your specific needs.
|
> your local `global-config-overlay` and modify it to your specific needs.
|
||||||
|
|
||||||
Naming a certificate for a list makes the script verify the server
|
Naming a certificate for a list makes the script verify the server
|
||||||
certificate, so you should add that if possible. You may want to find the
|
certificate, so you should add that if possible. Some certificates are
|
||||||
[certificate name from browser](../CERTIFICATES.md).
|
available in my repository and downloaded automatically. Import it manually
|
||||||
|
(menu `/certificate/`) if missing.
|
||||||
|
|
||||||
Create firewall rules to process the packets that are related to addresses
|
Create firewall rules to process the packets that are related to addresses
|
||||||
from address-lists.
|
from address-lists.
|
||||||
|
|
@ -127,11 +127,6 @@ Drop packets in firewall's raw section:
|
||||||
> ⚠️ **Warning**: Just again... The order of firewall rules is important. Make
|
> ⚠️ **Warning**: Just again... The order of firewall rules is important. Make
|
||||||
> sure they actually take effect as expected!
|
> sure they actually take effect as expected!
|
||||||
|
|
||||||
See also
|
|
||||||
--------
|
|
||||||
|
|
||||||
* [Certificate name from browser](../CERTIFICATES.md)
|
|
||||||
|
|
||||||
---
|
---
|
||||||
[⬅️ Go back to main README](../README.md)
|
[⬅️ Go back to main README](../README.md)
|
||||||
[⬆️ Go back to top](#top)
|
[⬆️ Go back to top](#top)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Wait for global functions and modules
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Send GPS position to server
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Use WPA network with hotspot credentials
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Manage IP addresses with bridge status
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Create DNS records for IPSec peers
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Update configuration on IPv6 prefix change
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
@ -45,17 +45,13 @@ Installing [ppp-on-up](ppp-on-up.md) may solve this.
|
||||||
Configuration
|
Configuration
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
As an address-list entry is mandatory a dynamic one is created automatically.
|
An address list entry is updated with current prefix and can be used in
|
||||||
It is updated with current prefix and can be used in firewall rules.
|
firewall rules, comment has to be "`ipv6-pool-`" and actual pool name:
|
||||||
|
|
||||||
Alternatively a static address-list entry can be used, where comment has to
|
|
||||||
be "`ipv6-pool-`" and actual pool name. Use what ever list is desired, and
|
|
||||||
create it with:
|
|
||||||
|
|
||||||
/ipv6/firewall/address-list/add address=2003:cf:2f0f:de00::/56 comment=ipv6-pool-isp list=extern;
|
/ipv6/firewall/address-list/add address=2003:cf:2f0f:de00::/56 comment=ipv6-pool-isp list=extern;
|
||||||
|
|
||||||
If the dynamic entry exists already you need to remove it before creating
|
As this entry is mandatory it is created automatically if it does not exist,
|
||||||
the static one..
|
with the comment also set for list.
|
||||||
|
|
||||||
Address list entries for specific interfaces can be updated as well. The
|
Address list entries for specific interfaces can be updated as well. The
|
||||||
interface needs to get its address from pool `isp` and the address list entry
|
interface needs to get its address from pool `isp` and the address list entry
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Run other scripts on DHCP lease
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Manage LEDs dark mode
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Forward log messages via notification
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
@ -22,15 +22,15 @@ server (see `/system/logging`). This has some limitation, however:
|
||||||
* does not work early after boot if network connectivity is not
|
* does not work early after boot if network connectivity is not
|
||||||
yet established, or breaks intermittently
|
yet established, or breaks intermittently
|
||||||
* lots of messages generate a flood of mails
|
* lots of messages generate a flood of mails
|
||||||
* Matrix, Ntfy and Telegram are not supported
|
* Matrix and Telegram are not supported
|
||||||
|
|
||||||
The script works around the limitations, for example it does:
|
The script works around the limitations, for example it does:
|
||||||
|
|
||||||
* read from `/log`, including messages from early boot
|
* read from `/log`, including messages from early boot
|
||||||
* skip multi-repeated messages
|
* skip multi-repeated messages
|
||||||
* rate-limit itself to mitigate flooding
|
* rate-limit itself to mitigate flooding
|
||||||
* forward via notification (which includes *e-mail*, *Matrix*, *Ntfy* and
|
* forward via notification (which includes *e-mail*, *Matrix* and *Telegram*
|
||||||
*Telegram* when installed and configured, see below)
|
when installed and configured, see below)
|
||||||
|
|
||||||
It is intended to be run periodically from scheduler, then collects new
|
It is intended to be run periodically from scheduler, then collects new
|
||||||
log messages and forwards them via notification.
|
log messages and forwards them via notification.
|
||||||
|
|
@ -53,12 +53,6 @@ Just install the script:
|
||||||
Configuration
|
Configuration
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
The default configuration should provide reasonable presets, filtering
|
|
||||||
*info*, and effectively forwarding *warning* and *error*.
|
|
||||||
|
|
||||||
> 💡️ **Hint**: Please try with defaults first, especially if you are not
|
|
||||||
> familiar with regular expressions!
|
|
||||||
|
|
||||||
The configuration goes to `global-config-overlay`, these are the parameters:
|
The configuration goes to `global-config-overlay`, these are the parameters:
|
||||||
|
|
||||||
* `LogForwardFilter`: define topics *not* to be forwarded
|
* `LogForwardFilter`: define topics *not* to be forwarded
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Manage ports in bridge
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Manage VLANs on bridge ports
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Inspect variables
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ IP address calculation
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Send notifications via e-mail
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Send notifications via Matrix
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
@ -46,15 +46,6 @@ The Matrix server is connected via encrypted https, and certificate
|
||||||
verification is applied. So make sure you have the certificate chain for
|
verification is applied. So make sure you have the certificate chain for
|
||||||
your server in device's certificate store.
|
your server in device's certificate store.
|
||||||
|
|
||||||
The example below is for `matrix.org`, which uses a trust chain from *Google
|
|
||||||
Trust Services*. Run this to import the required certificate:
|
|
||||||
|
|
||||||
$CertificateAvailable "GTS Root R4";
|
|
||||||
|
|
||||||
Replace the CA certificate name with what ever is needed for your server.
|
|
||||||
You may want to find the
|
|
||||||
[certificate name from browser](../../CERTIFICATES.md).
|
|
||||||
|
|
||||||
### From other device
|
### From other device
|
||||||
|
|
||||||
If you have setup your Matrix *notification account* before just reuse that.
|
If you have setup your Matrix *notification account* before just reuse that.
|
||||||
|
|
@ -129,7 +120,6 @@ function available:
|
||||||
See also
|
See also
|
||||||
--------
|
--------
|
||||||
|
|
||||||
* [Certificate name from browser](../../CERTIFICATES.md)
|
|
||||||
* [Send notifications via e-mail](notification-email.md)
|
* [Send notifications via e-mail](notification-email.md)
|
||||||
* [Send notifications via Ntfy](notification-ntfy.md)
|
* [Send notifications via Ntfy](notification-ntfy.md)
|
||||||
* [Send notifications via Telegram](notification-telegram.md)
|
* [Send notifications via Telegram](notification-telegram.md)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Send notifications via Ntfy
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
@ -52,12 +52,6 @@ basic authentication. Configure `NtfyServerUser` and `NtfyServerPass` for this.
|
||||||
Even authentication via access token is possible, adding it as password with
|
Even authentication via access token is possible, adding it as password with
|
||||||
a blank username.
|
a blank username.
|
||||||
|
|
||||||
Also available is `NtfyServerToken` to add a bearer token for authentication.
|
|
||||||
|
|
||||||
For a custom service installing an additional certificate may be required.
|
|
||||||
You may want to install that certificate manually, after finding the
|
|
||||||
[certificate name from browser](../../CERTIFICATES.md).
|
|
||||||
|
|
||||||
Usage and invocation
|
Usage and invocation
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
|
|
@ -88,7 +82,6 @@ function available:
|
||||||
See also
|
See also
|
||||||
--------
|
--------
|
||||||
|
|
||||||
* [Certificate name from browser](../../CERTIFICATES.md)
|
|
||||||
* [Send notifications via e-mail](notification-email.md)
|
* [Send notifications via e-mail](notification-email.md)
|
||||||
* [Send notifications via Matrix](notification-matrix.md)
|
* [Send notifications via Matrix](notification-matrix.md)
|
||||||
* [Send notifications via Telegram](notification-telegram.md)
|
* [Send notifications via Telegram](notification-telegram.md)
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 3.8 KiB |
|
|
@ -4,7 +4,7 @@ Send notifications via Telegram
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
@ -38,21 +38,14 @@ create your own bot:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Set that token from *BotFather* (use your own!) to `TelegramTokenId`, for
|
Now open a chat with your bot and start it by clicking the `START` button.
|
||||||
now just temporarily:
|
|
||||||
|
|
||||||
:set TelegramTokenId "5214364459:AAHLwf1o7ybbKDo6pY24Kd2bZ5rjCakDXTc";
|
Open just another chat with [GetIDs Bot](https://t.me/getidsbot), again start
|
||||||
|
with the `START` button. It will send you some information, including the
|
||||||
Now open a chat with your bot and start it by clicking the `START` button,
|
`id`, just below `You`.
|
||||||
then send your first message. Any text will do. On your device run
|
|
||||||
`$GetTelegramChatId` to retrieve the chat id:
|
|
||||||
|
|
||||||
$GetTelegramChatId;
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Finally edit `global-config-overlay`, add `TelegramTokenId` with the token
|
Finally edit `global-config-overlay`, add `TelegramTokenId` with the token
|
||||||
from *BotFather* and `TelegramChatId` with your retrieved chat id. Then
|
from *BotFather* and `TelegramChatId` with your id from *GetIDs Bot*. Then
|
||||||
reload the configuration.
|
reload the configuration.
|
||||||
|
|
||||||
> ℹ️ **Info**: Copy relevant configuration from
|
> ℹ️ **Info**: Copy relevant configuration from
|
||||||
|
|
@ -61,13 +54,9 @@ reload the configuration.
|
||||||
|
|
||||||
### Notifications to a group
|
### Notifications to a group
|
||||||
|
|
||||||
Sending notifications to a group is possible as well. Add your bot to a group
|
Sending notifications to a group is possible as well. Add your bot and the
|
||||||
and make it an admin (required for read access!) and send a message and run
|
*GetIDs Bot* to a group, then use the group's id (which starts with a dash)
|
||||||
`$GetTelegramChatId` again. Then use that chat id (which starts with a dash)
|
for `TelegramChatId`. Then remove *GetIDs Bot* from group.
|
||||||
for `TelegramChatId`.
|
|
||||||
|
|
||||||
Groups can enable the `Topics` feature. Use `TelegramThreadId` to send to a
|
|
||||||
specific topic in a group.
|
|
||||||
|
|
||||||
Usage and invocation
|
Usage and invocation
|
||||||
--------------------
|
--------------------
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Download script and run it once
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Import ssh keys for public key authentication
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
@ -34,9 +34,13 @@ Usage and invocation
|
||||||
Call the function `$SSHKeysImport` with key and user as parameter to
|
Call the function `$SSHKeysImport` with key and user as parameter to
|
||||||
import that key:
|
import that key:
|
||||||
|
|
||||||
$SSHKeysImport "ssh-ed25519 AAAAC3Nza...ZVugJT user" admin;
|
|
||||||
$SSHKeysImport "ssh-rsa AAAAB3Nza...QYZk8= user" admin;
|
$SSHKeysImport "ssh-rsa AAAAB3Nza...QYZk8= user" admin;
|
||||||
|
|
||||||
|
Starting with RouterOS *7.12beta1* support for keys of type `ed25519` has
|
||||||
|
been added:
|
||||||
|
|
||||||
|
$SSHKeysImport "ssh-ed25519 AAAAC3Nza...ZVugJT user" admin;
|
||||||
|
|
||||||
The third part of the key (`user` in this example) is inherited as
|
The third part of the key (`user` in this example) is inherited as
|
||||||
`key-owner` in RouterOS. Also the `MD5` fingerprint is recorded, this helps
|
`key-owner` in RouterOS. Also the `MD5` fingerprint is recorded, this helps
|
||||||
to audit and verify the available keys.
|
to audit and verify the available keys.
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Mode button with multiple presses
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Manage DNS and DoH servers from netwatch
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
@ -53,23 +53,19 @@ 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
|
Adding a static DNS record has the same result for the url, but always
|
||||||
resolves to the same address.
|
resolves to the same address.
|
||||||
|
|
||||||
/ip/dns/static/add name="cloudflare-dns.com" address=1.1.1.1;
|
/ip/dns/static/add name="dns.nextdns.io" address=199.247.16.158;
|
||||||
/tool/netwatch/add comment="doh" host=1.1.1.1;
|
/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
|
Be aware that you have to keep the ip address in sync with real world
|
||||||
manually!
|
manually!
|
||||||
|
|
||||||
Importing a certificate automatically is possible. You may want to find the
|
Importing a certificate automatically is possible, at least if available in
|
||||||
[certificate name from browser](../CERTIFICATES.md).
|
the repository (see `certs` sub directory).
|
||||||
|
|
||||||
/tool/netwatch/add comment="doh, doh-cert=DigiCert Global Root G2" host=1.1.1.1;
|
/tool/netwatch/add comment="doh, doh-cert=DigiCert Global Root G2" host=1.1.1.1;
|
||||||
/tool/netwatch/add comment="doh, doh-cert=DigiCert Global Root G3" host=9.9.9.9;
|
/tool/netwatch/add comment="doh, doh-cert=DigiCert Global Root CA" host=9.9.9.9;
|
||||||
/tool/netwatch/add comment="doh, doh-cert=GTS Root R1" host=8.8.8.8;
|
/tool/netwatch/add comment="doh, doh-cert=GTS Root R1" host=8.8.8.8;
|
||||||
|
|
||||||
> ⚠️ **Warning**: Combining these techniques can cause some confusion and
|
|
||||||
> troubles! Chances are that a service uses different certificates based
|
|
||||||
> on indicated server name.
|
|
||||||
|
|
||||||
Sometimes using just one specific (possibly internal) DNS server may be
|
Sometimes using just one specific (possibly internal) DNS server may be
|
||||||
desired, with fallback in case it fails. This is possible as well:
|
desired, with fallback in case it fails. This is possible as well:
|
||||||
|
|
||||||
|
|
@ -91,7 +87,6 @@ Also this allows to update host address, see option `resolve`.
|
||||||
See also
|
See also
|
||||||
--------
|
--------
|
||||||
|
|
||||||
* [Certificate name from browser](../CERTIFICATES.md)
|
|
||||||
* [Notify on host up and down](netwatch-notify.md)
|
* [Notify on host up and down](netwatch-notify.md)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Notify on host up and down
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
@ -66,9 +66,9 @@ notification is sent.
|
||||||
Getting the escaping right may be troublesome. Please consider adding a
|
Getting the escaping right may be troublesome. Please consider adding a
|
||||||
script in `/system/script`, then running that from hook.
|
script in `/system/script`, then running that from hook.
|
||||||
|
|
||||||
### Count threshold
|
### Count threshould
|
||||||
|
|
||||||
The count threshold (default is 5 checks) is configurable as well:
|
The count threshould (default is 5 checks) is configurable as well:
|
||||||
|
|
||||||
/tool/netwatch/add comment="notify, name=example.com, count=10" host=104.18.144.11;
|
/tool/netwatch/add comment="notify, name=example.com, count=10" host=104.18.144.11;
|
||||||
|
|
||||||
|
|
@ -81,24 +81,19 @@ suppress notification if the parent host is down:
|
||||||
/tool/netwatch/add comment="notify, name=example.com, parent=gateway" host=93.184.216.34;
|
/tool/netwatch/add comment="notify, name=example.com, parent=gateway" host=93.184.216.34;
|
||||||
|
|
||||||
Note that every configured parent in a chain increases the check count
|
Note that every configured parent in a chain increases the check count
|
||||||
threshold by one.
|
threshould by one.
|
||||||
|
|
||||||
### Update from DNS
|
### Update from DNS
|
||||||
|
|
||||||
The host address can be updated dynamically. Give extra parameter `resolve`
|
The host address can be updated dynamically. Give extra parameter `resolve`
|
||||||
with a resolvable name:
|
with a resolvable name:
|
||||||
|
|
||||||
/tool/netwatch/add comment="notify, name=example.com, resolve=example.com" host=0.0;
|
/tool/netwatch/add comment="notify, name=example.com, resolve=example.com";
|
||||||
|
|
||||||
This supports multiple A records for a name just fine, even a CNAME
|
This supports multiple A or AAAA records for a name just fine, even a CNAME
|
||||||
to those. An update happens only if no more record with the configured host
|
to those. An update happens only if no more record with the configured host
|
||||||
address is found.
|
address is found.
|
||||||
|
|
||||||
The address family is preserved, so if you want AAAA records (for IPv6)
|
|
||||||
use this:
|
|
||||||
|
|
||||||
/tool/netwatch/add comment="notify, name=example.com, resolve=example.com" host=::;
|
|
||||||
|
|
||||||
### No notification on host down
|
### No notification on host down
|
||||||
|
|
||||||
Also suppressing the notification on host down is possible with parameter
|
Also suppressing the notification on host down is possible with parameter
|
||||||
|
|
@ -130,7 +125,7 @@ included verbatim into the notification.
|
||||||
It is possible to add a link in notification, that is added below the
|
It is possible to add a link in notification, that is added below the
|
||||||
formatted notification text.
|
formatted notification text.
|
||||||
|
|
||||||
/tool/netwatch/add comment="notify, name=example.com, resolve=example.com, link=https://example.com/" host=0.0;
|
/tool/netwatch/add comment="notify, name=example.com, resolve=example.com, link=https://example.com/";
|
||||||
|
|
||||||
Tips & Tricks
|
Tips & Tricks
|
||||||
-------------
|
-------------
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Visualize OSPF state via LEDs
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Manage system update
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Run scripts on ppp connection
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||