Compare commits

..

No commits in common. "main" and "routeros-7.17beta4-1" have entirely different histories.

143 changed files with 875 additions and 2009 deletions

View file

@ -4,7 +4,7 @@ Installing from branches
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](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:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

View file

@ -1,82 +0,0 @@
Certificate name from browser
=============================
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](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*".
![screenshot: dialog A](CERTIFICATES.d/01-dialog-A.avif)
The dialog will change, click "*More information*".
![screenshot: dialog B](CERTIFICATES.d/02-dialog-B.avif)
A new window opens, click the button "*View Certificate*". (That window
can be closed now.)
![screenshot: window](CERTIFICATES.d/03-window.avif)
A new tab opens, showing information on the server certificate and its
chain of trust. The leftmost certificate is what we are interested in.
![screenshot: certificate](CERTIFICATES.d/04-certificate.avif)
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)

View file

@ -4,7 +4,7 @@ Past Contributions
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
@ -22,7 +22,6 @@ for details!
* [Daniel Ziegenberg](mailto:daniel@ziegenberg.at) (@ziegenberg) * [Daniel Ziegenberg](mailto:daniel@ziegenberg.at) (@ziegenberg)
* [Ignacio Serrano](mailto:ignic@ignic.com) (@ignic) * [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)

View file

@ -1,63 +0,0 @@
Debug output and logs
=====================
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](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)

View file

@ -4,7 +4,7 @@ Initial commands
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
@ -19,7 +19,7 @@ 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!";
}; };

View file

@ -4,7 +4,7 @@ RouterOS Scripts
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](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
@ -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.

View file

@ -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.14
# #
# 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 ];
}

View file

@ -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.14
# #
# 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 ];
}

View file

@ -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.14
# #
# 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 ];
}

View file

@ -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.14
# #
# 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 ];
}

View file

@ -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.14
# #
# 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 ];
}

View file

@ -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.14
# #
# 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 ];
}

View file

@ -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.14
# 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 ];
@ -44,21 +42,12 @@
: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,7 +56,6 @@
: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;
} }
@ -77,7 +65,6 @@
:if ([ :len $FallbackTo ] < 1) do={ :if ([ :len $FallbackTo ] < 1) do={
$LogPrint error $ScriptName ("There is no inactive partition named '" . $FallbackToName . "'."); $LogPrint error $ScriptName ("There is no inactive partition named '" . $FallbackToName . "'.");
:set PackagesUpdateBackupFailure true; :set PackagesUpdateBackupFailure true;
:set ExitOK true;
:error false; :error false;
} }
@ -87,7 +74,6 @@
: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 $FallbackToName ] = false) do={
:set PackagesUpdateBackupFailure true; :set PackagesUpdateBackupFailure true;
:set ExitOK true;
:error false; :error false;
} }
} }
@ -100,7 +86,6 @@
($NumInstalled & $BitMask) != ($NumLatest & $BitMask)) do={ ($NumInstalled & $BitMask) != ($NumLatest & $BitMask)) do={
:if ([ $CopyTo $ScriptName $FallbackTo $FallbackToName ] = false) do={ :if ([ $CopyTo $ScriptName $FallbackTo $FallbackToName ] = false) do={
:set PackagesUpdateBackupFailure true; :set PackagesUpdateBackupFailure true;
:set ExitOK true;
:error false; :error false;
} }
} }
@ -118,9 +103,6 @@
/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 '" . $FallbackToName . "'!");
:set PackagesUpdateBackupFailure true; :set PackagesUpdateBackupFailure true;
:set ExitOK true;
:error false; :error false;
} }
} on-error={ } on-error={ }
:global ExitError; $ExitError $ExitOK [ :jobname ];
}

View file

@ -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.14
# 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 ];
}

View file

@ -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.14
# #
# 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;
} }
} }
@ -87,6 +82,4 @@
/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 ];
}

View file

@ -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.14
# #
# 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;
} }
} }
@ -98,6 +93,4 @@
/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 ];
}

View file

@ -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.14
# #
# 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;
} }
} }
@ -89,6 +84,4 @@
/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 ];
}

View file

@ -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.capsman
# requires RouterOS, version=7.15 # requires RouterOS, version=7.14
# #
# 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 ];
}

View file

@ -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%TEMPL%
# requires RouterOS, version=7.15 # requires RouterOS, version=7.14
# #
# 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 ];
}

View file

@ -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.wifi
# requires RouterOS, version=7.15 # requires RouterOS, version=7.14
# #
# 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 ];
}

View file

@ -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.14
# #
# 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/GlobalSign.pem Normal file
View 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-----

View file

@ -1,58 +1,31 @@
# Makefile to check certificates # Makefile to check certificates
CURL = curl \ DOMAINS = \
--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 \ 1.1.1.1/DigiCert-Global-Root-G2 \
8.8.8.8/GTS-Root-R1 \ 8.8.8.8/GTS-Root-R1 \
9.9.9.9/DigiCert-Global-Root-G3 \ 9.9.9.9/DigiCert-Global-Root-G3 \
api.macvendors.com/GTS-Root-R4 \
api.mullvad.net/ISRG-Root-X1 \ api.mullvad.net/ISRG-Root-X1 \
api.telegram.org/Go-Daddy-Root-Certificate-Authority-G2 \
cloudflare-dns.com/DigiCert-Global-Root-G2 \
dns.google/GTS-Root-R1 \
dns.quad9.net/DigiCert-Global-Root-G3 \
feodotracker.abuse.ch/GlobalSign \
git.eworm.de/ISRG-Root-X2 \
ipv4.showipv6.de/ISRG-Root-X1 \ ipv4.showipv6.de/ISRG-Root-X1 \
ipv4.tunnelbroker.net/Starfield-Root-Certificate-Authority-G2 \ ipv4.tunnelbroker.net/Starfield-Root-Certificate-Authority-G2 \
ipv6.showipv6.de/ISRG-Root-X1 \
lists.blocklist.de/Certum-Trusted-Network-CA \
mkcert.org/ISRG-Root-X1 \ mkcert.org/ISRG-Root-X1 \
ntfy.sh/ISRG-Root-X1 \ ntfy.sh/ISRG-Root-X1 \
sslbl.abuse.ch/GlobalSign \
upgrade.mikrotik.com/ISRG-Root-X1 \
www.dshield.org/ISRG-Root-X1 \ www.dshield.org/ISRG-Root-X1 \
www.spamhaus.org/GTS-Root-R4 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) .PHONY: $(DOMAINS)
all: $(DOMAINS_DUAL) $(DOMAINS_IPV4) $(DOMAINS_IPV6) all: $(DOMAINS)
$(DOMAINS_DUAL): $(DOMAINS):
ifndef NOIPV4 curl --output /dev/null --silent --connect-timeout 5 --cacert $(notdir $@).pem https://$(dir $@)
$(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

View file

@ -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-----

View file

@ -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.14
# 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 { :local Result [ /certificate/import file-name=$CertFileName passphrase=$PassPhrase as-value ];
$LogPrint debug $ScriptName ("Trying " . $I . ". passphrase... "); :if ($Result->"decryption-failures" = 0) do={
:local Result [ /certificate/import file-name=$CertFileName passphrase=$PassPhrase as-value ]; :set DecryptionFailed false;
:if ($Result->"decryption-failures" = 0) do={ }
$LogPrint debug $ScriptName ("Success!");
: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,7 +133,6 @@
} }
:if ([ $ScriptLock $ScriptName ] = false) do={ :if ([ $ScriptLock $ScriptName ] = false) do={
:set ExitOK true;
:error false; :error false;
} }
$WaitFullyConnected; $WaitFullyConnected;
@ -152,7 +140,6 @@
: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 LastName; :local LastName;
:local FetchName;
:do { :do {
:if ([ :len $CertRenewUrl ] = 0) do={ :if ([ :len $CertRenewUrl ] = 0) do={
@ -163,17 +150,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 +165,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]+\$") \ :local 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 ];
@ -237,6 +218,4 @@
", it is invalid after " . ($CertVal->"invalid-after") . "."); ", it is invalid after " . ($CertVal->"invalid-after") . ".");
} }
} }
} on-error={ } on-error={ }
:global ExitError; $ExitError $ExitOK [ :jobname ];
}

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -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.14
# #
# 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={
:set CheckHealthTemperatureNotified ({});
}
:foreach Plugin in=$Plugins do={
:local PluginVal [ /system/script/get $Plugin ]; :foreach Voltage in=[ /system/health/find where type="V" ] do={
:if ([ $ValidateSyntax ($PluginVal->"source") ] = true) do={ :local Name [ /system/health/get $Voltage name ];
:do { :local Value [ /system/health/get $Voltage value ];
/system/script/run $Plugin;
} on-error={ :if ([ :typeof ($CheckHealthLast->$Name) ] != "nothing") do={
$LogPrint error $ScriptName ("Plugin '" . $ScriptVal->"name" . "' failed to run."); :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={
: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.") });
}
} }
} else={
$LogPrint error $ScriptName ("Plugin '" . $ScriptVal->"name" . "' failed syntax validation, skipping.");
} }
: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={ }

View file

@ -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.14
# #
# 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 ];
}

View file

@ -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.14
# 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,75 +34,32 @@
: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 BitMask [ $VersionToNum "255.255zero0" ];
@ -112,9 +67,8 @@
:local NumLatestFeature ($NumLatest & $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,9 +80,7 @@
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 && $NumInstalledFeature = $NumLatestFeature) do={
@ -137,9 +89,7 @@
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 +103,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,9 +123,7 @@
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;
} }
} }
@ -187,16 +133,13 @@
:if (([ /terminal/inkey timeout=60 ] % 32) = 25) do={ :if (([ /terminal/inkey timeout=60 ] % 32) = 25) do={
/system/package/update/set channel=stable; /system/package/update/set channel=stable;
$LogPrint info $ScriptName ("Switched to channel 'stable', please re-run!"); $LogPrint info $ScriptName ("Switched to channel 'stable', please re-run!");
:set ExitOK true;
:error 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 +148,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 +163,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 +175,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 ];
}

View file

@ -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.14
# #
# 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 ];
}

View file

@ -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.14
# #
# 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 ];
}

View file

@ -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.14
# #
# 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 ];
}

View file

@ -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.14
# #
# 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 ];
}

View file

@ -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.15
# #
# 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 ];
@ -32,7 +31,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 +89,4 @@
} }
} }
} }
} on-error={ } on-error={ }
:global ExitError; $ExitError $ExitOK [ :jobname ];
}

View file

@ -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.15
# #
# 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 ];
@ -32,7 +31,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 +88,4 @@
} }
} }
} }
} on-error={ } on-error={ }
:global ExitError; $ExitError $ExitOK [ :jobname ];
}

View file

@ -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.15
# #
# 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 ];
@ -33,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;
@ -106,6 +104,4 @@
} }
} }
} }
} on-error={ } on-error={ }
:global ExitError; $ExitError $ExitOK [ :jobname ];
}

View file

@ -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.15
# #
# 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 ];
@ -32,7 +31,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 +89,4 @@
} }
} }
} }
} on-error={ } on-error={ }
:global ExitError; $ExitError $ExitOK [ :jobname ];
}

View file

@ -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.14
# #
# 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 ];
}

View file

@ -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.14
# #
# 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 ];
}

View file

@ -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.14
# #
# 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 ];
}

View file

@ -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.14
# #
# 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 ];
}

View file

@ -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.14
# #
# 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 ];
}

View file

@ -4,7 +4,7 @@ Find and remove access list duplicates
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Upload backup to Mikrotik cloud
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Send backup via e-mail
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Save configuration to fallback partition
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Upload backup to server
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Download packages for CAP upgrade from CAPsMAN
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Run rolling CAP upgrades from CAPsMAN
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Renew locally issued certificates
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Renew certificates and notify on expiration
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before After
Before After

View file

@ -4,7 +4,7 @@ Notify about health state
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](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
![check-health notification state fail](check-health.d/notification-08-state-fail.avif) ![check-health notification psu fail](check-health.d/notification-08-psu-fail.avif)
![check-health notification state ok](check-health.d/notification-09-state-ok.avif) ![check-health notification psu ok](check-health.d/notification-09-psu-ok.avif)
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
------------- -------------

View file

@ -4,7 +4,7 @@ Notify on LTE firmware upgrade
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Notify on RouterOS update
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Collect MAC addresses in wireless access list
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Comment DHCP leases with info from access list
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Create DNS records for DHCP leases
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.16-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Automatically upgrade firmware and reboot
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Download, import and update firewall address-lists
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.16-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](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)

View file

@ -4,7 +4,7 @@ Wait for global functions and modules
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Send GPS position to server
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Use WPA network with hotspot credentials
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Manage IP addresses with bridge status
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Create DNS records for IPSec peers
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Update configuration on IPv6 prefix change
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](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

View file

@ -4,7 +4,7 @@ Run other scripts on DHCP lease
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Manage LEDs dark mode
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Forward log messages via notification
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](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

View file

@ -4,7 +4,7 @@ Manage ports in bridge
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Manage VLANs on bridge ports
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Inspect variables
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ IP address calculation
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Send notifications via e-mail
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Send notifications via Matrix
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](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)

View file

@ -4,7 +4,7 @@ Send notifications via Ntfy
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](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)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

View file

@ -4,7 +4,7 @@ Send notifications via Telegram
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
@ -38,21 +38,14 @@ create your own bot:
![create new bot](notification-telegram.d/newbot.avif) ![create new bot](notification-telegram.d/newbot.avif)
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;
![get chat id](notification-telegram.d/getchatid.avif)
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
-------------------- --------------------

View file

@ -4,7 +4,7 @@ Download script and run it once
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Import ssh keys for public key authentication
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.16-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Mode button with multiple presses
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Manage DNS and DoH servers from netwatch
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.16-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](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 G3" 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)
--- ---

View file

@ -4,7 +4,7 @@ Visualize OSPF state via LEDs
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Manage system update
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Run scripts on ppp connection
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Act on received SMS
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Forward received SMS
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Play Super Mario theme
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Install LTE firmware upgrade
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Update GRE configuration with dynamic addresses
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -4,7 +4,7 @@ Update tunnelbroker configuration
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -1,17 +1,16 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: firmware-upgrade-reboot # RouterOS script: firmware-upgrade-reboot
# 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
# #
# requires RouterOS, version=7.15 # requires RouterOS, version=7.14
# #
# install firmware upgrade, and reboot # install firmware upgrade, and reboot
# https://rsc.eworm.de/doc/firmware-upgrade-reboot.md # https://git.eworm.de/cgit/routeros-scripts/about/doc/firmware-upgrade-reboot.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 VersionToNum; :global VersionToNum;
:if ([ $ScriptLock $ScriptName ] = false) do={ :if ([ $ScriptLock $ScriptName ] = false) do={
:set ExitOK true;
:error false; :error false;
} }
@ -28,12 +26,10 @@
:if ($RouterBoard->"current-firmware" = $RouterBoard->"upgrade-firmware") do={ :if ($RouterBoard->"current-firmware" = $RouterBoard->"upgrade-firmware") do={
$LogPrint info $ScriptName ("Current and upgrade firmware match with version " . \ $LogPrint info $ScriptName ("Current and upgrade firmware match with version " . \
$RouterBoard->"current-firmware" . "."); $RouterBoard->"current-firmware" . ".");
:set ExitOK true;
:error true; :error true;
} }
:if ([ $VersionToNum ($RouterBoard->"current-firmware") ] > [ $VersionToNum ($RouterBoard->"upgrade-firmware") ]) do={ :if ([ $VersionToNum ($RouterBoard->"current-firmware") ] > [ $VersionToNum ($RouterBoard->"upgrade-firmware") ]) do={
$LogPrint info $ScriptName ("Different firmware version is available, but it is a downgrade. Ignoring."); $LogPrint info $ScriptName ("Different firmware version is available, but it is a downgrade. Ignoring.");
:set ExitOK true;
:error true; :error true;
} }
@ -55,6 +51,4 @@
$LogPrint info $ScriptName ("Firmware upgrade successful, rebooting."); $LogPrint info $ScriptName ("Firmware upgrade successful, rebooting.");
/system/reboot; /system/reboot;
} on-error={ } on-error={ }
:global ExitError; $ExitError $ExitOK [ :jobname ];
}

View file

@ -1,17 +1,16 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: fw-addr-lists # RouterOS script: fw-addr-lists
# Copyright (c) 2023-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2023-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.16 # requires RouterOS, version=7.14
# #
# download, import and update firewall address-lists # download, import and update firewall address-lists
# https://rsc.eworm.de/doc/fw-addr-lists.md # https://git.eworm.de/cgit/routeros-scripts/about/doc/fw-addr-lists.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 ];
@ -24,7 +23,6 @@
:global HumanReadableNum; :global HumanReadableNum;
:global LogPrint; :global LogPrint;
:global LogPrintOnce; :global LogPrintOnce;
:global LogPrintVerbose;
:global ScriptLock; :global ScriptLock;
:global WaitFullyConnected; :global WaitFullyConnected;
@ -37,13 +35,7 @@
} }
} }
:local GetBranch do={
:global EitherOr;
:return [ :pick [ :convert transform=md5 to=hex [ :pick $1 0 [ $EitherOr [ :find $1 "/" ] [ :len $1 ] ] ] ] 0 2 ];
}
:if ([ $ScriptLock $ScriptName ] = false) do={ :if ([ $ScriptLock $ScriptName ] = false) do={
:set ExitOK true;
:error false; :error false;
} }
$WaitFullyConnected; $WaitFullyConnected;
@ -73,7 +65,7 @@
:for I from=1 to=5 do={ :for I from=1 to=5 do={
:if ($Data = false) do={ :if ($Data = false) do={
:set Data [ :tolf [ $FetchHuge $ScriptName ($List->"url") $CheckCertificate ] ]; :set Data [ $FetchHuge $ScriptName ($List->"url") $CheckCertificate ];
:if ($Data = false) do={ :if ($Data = false) do={
:if ($I < 5) do={ :if ($I < 5) do={
$LogPrint debug $ScriptName ("Failed downloading for list '" . $FwListName . \ $LogPrint debug $ScriptName ("Failed downloading for list '" . $FwListName . \
@ -94,55 +86,45 @@
"B for list '" . $FwListName . "' from: " . $List->"url"); "B for list '" . $FwListName . "' from: " . $List->"url");
} }
:foreach Line in=[ :deserialize $Data delimiter="\n" from=dsv options=dsv.plain ] do={ :while ([ :len $Data ] != 0) do={
:set Line ($Line->0); :local Line [ :pick $Data 0 [ :find $Data "\n" ] ];
:local Address; :local Address;
:if ([ :pick $Line 0 1 ] = "{") do={ :if ([ :pick $Line 0 1 ] = "{") do={
:do { :set Address [ :tostr ([ :deserialize from=json $Line ]->"cidr") ];
:set Address [ :tostr ([ :deserialize from=json $Line ]->"cidr") ];
} on-error={ }
} else={ } else={
:set Address ([ :pick $Line 0 [ $FindDelim $Line ] ] . ($List->"cidr")); :set Address ([ :pick $Line 0 [ $FindDelim $Line ] ] . ($List->"cidr"));
} }
:do { :do {
:local Branch [ $GetBranch $Address ];
:if ($Address ~ "^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}(/[0-9]{1,2})?\$") do={ :if ($Address ~ "^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}(/[0-9]{1,2})?\$") do={
:if ($Address ~ "/32\$") do={ :set ($IPv4Addresses->$Address) $TimeOut;
:set Address [ :pick $Address 0 ([ :len $Address ] - 3) ];
}
:set ($IPv4Addresses->$Branch->$Address) $TimeOut;
:error true; :error true;
} }
:if ($Address ~ "^[0-9a-zA-Z]*:[0-9a-zA-Z:\\.]+(/[0-9]{1,3})?\$") do={ :if ($Address ~ "^[0-9a-zA-Z]*:[0-9a-zA-Z:\\.]+(/[0-9]{1,3})?\$") do={
:if ($Address ~ "/128\$") do={ :set ($IPv6Addresses->$Address) $TimeOut;
:set Address [ :pick $Address 0 ([ :len $Address ] - 4) ];
}
:set ($IPv6Addresses->$Branch->$Address) $TimeOut;
:error true; :error true;
} }
:if ($Address ~ "^[\\.a-zA-Z0-9-]+\\.[a-zA-Z]{2,}\$") do={ :if ($Address ~ "^[\\.a-zA-Z0-9-]+\\.[a-zA-Z]{2,}\$") do={
:set ($IPv4Addresses->$Branch->$Address) $TimeOut; :set ($IPv4Addresses->$Address) $TimeOut;
:set ($IPv6Addresses->$Branch->$Address) $TimeOut; :set ($IPv6Addresses->$Address) $TimeOut;
:error true; :error true;
} }
} on-error={ } } on-error={ }
:set Data [ :pick $Data ([ :len $Line ] + 1) [ :len $Data ] ];
} }
} }
:foreach Entry in=[ /ip/firewall/address-list/find where \ :foreach Entry in=[ /ip/firewall/address-list/find where \
list=$FwListName comment=$ListComment ] do={ list=$FwListName comment=$ListComment ] do={
:local Address [ /ip/firewall/address-list/get $Entry address ]; :local Address [ /ip/firewall/address-list/get $Entry address ];
:local Branch [ $GetBranch $Address ]; :if ([ :typeof ($IPv4Addresses->$Address) ] = "time") do={
:local TimeOut ($IPv4Addresses->$Branch->$Address); $LogPrint debug $ScriptName ("Renewing IPv4 address in list '" . $FwListName . \
:if ([ :typeof $TimeOut ] = "time") do={ "' with " . ($IPv4Addresses->$Address) . ": " . $Address);
$LogPrintVerbose debug $ScriptName ("Renewing IPv4 address in list '" . $FwListName . \ /ip/firewall/address-list/set $Entry timeout=($IPv4Addresses->$Address);
"' with " . $TimeOut . ": " . $Address); :set ($IPv4Addresses->$Address);
/ip/firewall/address-list/set $Entry timeout=$TimeOut;
:set ($IPv4Addresses->$Branch->$Address);
:set CntRenew ($CntRenew + 1); :set CntRenew ($CntRenew + 1);
} else={ } else={
:if ($Failure = false) do={ :if ($Failure = false) do={
$LogPrintVerbose debug $ScriptName ("Removing IPv4 address from list '" . $FwListName . \ $LogPrint debug $ScriptName ("Removing IPv4 address from list '" . $FwListName . \
"': " . $Address); "': " . $Address);
/ip/firewall/address-list/remove $Entry; /ip/firewall/address-list/remove $Entry;
:set CntRemove ($CntRemove + 1); :set CntRemove ($CntRemove + 1);
@ -153,17 +135,15 @@
:foreach Entry in=[ /ipv6/firewall/address-list/find where \ :foreach Entry in=[ /ipv6/firewall/address-list/find where \
list=$FwListName comment=$ListComment ] do={ list=$FwListName comment=$ListComment ] do={
:local Address [ /ipv6/firewall/address-list/get $Entry address ]; :local Address [ /ipv6/firewall/address-list/get $Entry address ];
:local Branch [ $GetBranch $Address ]; :if ([ :typeof ($IPv6Addresses->$Address) ] = "time") do={
:local TimeOut ($IPv6Addresses->$Branch->$Address); $LogPrint debug $ScriptName ("Renewing IPv6 address in list '" . $FwListName . \
:if ([ :typeof $TimeOut ] = "time") do={ "' with " . ($IPv6Addresses->$Address) . ": " . $Address);
$LogPrintVerbose debug $ScriptName ("Renewing IPv6 address in list '" . $FwListName . \ /ipv6/firewall/address-list/set $Entry timeout=($IPv6Addresses->$Address);
"' with " . $TimeOut . ": " . $Address); :set ($IPv6Addresses->$Address);
/ipv6/firewall/address-list/set $Entry timeout=$TimeOut;
:set ($IPv6Addresses->$Branch->$Address);
:set CntRenew ($CntRenew + 1); :set CntRenew ($CntRenew + 1);
} else={ } else={
:if ($Failure = false) do={ :if ($Failure = false) do={
$LogPrintVerbose debug $ScriptName ("Removing IPv6 address from list '" . $FwListName . \ $LogPrint debug $ScriptName ("Removing IPv6 address from list '" . $FwListName . \
"': " . $Address); "': " . $Address);
/ipv6/firewall/address-list/remove $Entry; /ipv6/firewall/address-list/remove $Entry;
:set CntRemove ($CntRemove + 1); :set CntRemove ($CntRemove + 1);
@ -171,35 +151,31 @@
} }
} }
:foreach BranchName,Branch in=$IPv4Addresses do={ :foreach Address,Timeout in=$IPv4Addresses do={
$LogPrintVerbose debug $ScriptName ("Handling branch: " . $BranchName); $LogPrint debug $ScriptName ("Adding IPv4 address to list '" . $FwListName . \
:foreach Address,Timeout in=$Branch do={ "' with " . $Timeout . ": " . $Address);
$LogPrintVerbose debug $ScriptName ("Adding IPv4 address to list '" . $FwListName . \ :do {
"' with " . $Timeout . ": " . $Address); /ip/firewall/address-list/add list=$FwListName comment=$ListComment \
:do { address=$Address timeout=$Timeout;
/ip/firewall/address-list/add list=$FwListName comment=$ListComment \ :set ($IPv4Addresses->$Address);
address=$Address timeout=$Timeout; :set CntAdd ($CntAdd + 1);
:set CntAdd ($CntAdd + 1); } on-error={
} on-error={ $LogPrint warning $ScriptName ("Failed to add IPv4 address to list '" . $FwListName . \
$LogPrint warning $ScriptName ("Failed to add IPv4 address to list '" . $FwListName . \ "': " . $Address);
"': " . $Address);
}
} }
} }
:foreach BranchName,Branch in=$IPv6Addresses do={ :foreach Address,Timeout in=$IPv6Addresses do={
$LogPrintVerbose debug $ScriptName ("Handling branch: " . $BranchName); $LogPrint debug $ScriptName ("Adding IPv6 address to list '" . $FwListName . \
:foreach Address,Timeout in=$Branch do={ "' with " . $Timeout . ": " . $Address);
$LogPrintVerbose debug $ScriptName ("Adding IPv6 address to list '" . $FwListName . \ :do {
"' with " . $Timeout . ": " . $Address); /ipv6/firewall/address-list/add list=$FwListName comment=$ListComment \
:do { address=$Address timeout=$Timeout;
/ipv6/firewall/address-list/add list=$FwListName comment=$ListComment \ :set ($IPv6Addresses->$Address);
address=$Address timeout=$Timeout; :set CntAdd ($CntAdd + 1);
:set CntAdd ($CntAdd + 1); } on-error={
} on-error={ $LogPrint warning $ScriptName ("Failed to add IPv6 address to list '" . $FwListName . \
$LogPrint warning $ScriptName ("Failed to add IPv6 address to list '" . $FwListName . \ "': " . $Address);
"': " . $Address);
}
} }
} }
@ -209,6 +185,4 @@
" - renewed: " . [ $HumanReadableNum $CntRenew 1000 ] . \ " - renewed: " . [ $HumanReadableNum $CntRenew 1000 ] . \
" - removed: " . [ $HumanReadableNum $CntRemove 1000 ]); " - removed: " . [ $HumanReadableNum $CntRemove 1000 ]);
} }
} on-error={ } on-error={ }
:global ExitError; $ExitError $ExitOK [ :jobname ];
}

Some files were not shown because too many files have changed in this diff Show more