Compare commits
No commits in common. "main" and "change-132" have entirely different histories.
main
...
change-132
3
.gitignore
vendored
|
|
@ -9,8 +9,5 @@
|
||||||
# html files (as generated from markdown)
|
# html files (as generated from markdown)
|
||||||
*.html
|
*.html
|
||||||
|
|
||||||
# checksums file as used by $ScriptInstallUpdate
|
|
||||||
checksums.json
|
|
||||||
|
|
||||||
# Mac OS X folder settings file
|
# Mac OS X folder settings file
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Installing from branches
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
@ -13,7 +13,7 @@ Installing from branches
|
||||||
> ⚠️ **Warning**: Living on the edge? Great, read on!
|
> ⚠️ **Warning**: Living on the edge? Great, read on!
|
||||||
> If not: Please use the `main` branch and leave this page!
|
> If not: Please use the `main` branch and leave this page!
|
||||||
|
|
||||||
These scripts are developed in a [git ↗️](https://git-scm.com/) repository.
|
These scripts are developed in a [git](https://git-scm.com/) repository.
|
||||||
Development and experimental branches are used to provide early access
|
Development and experimental branches are used to provide early access
|
||||||
for specific changes. You can install scripts from these branches
|
for specific changes. You can install scripts from these branches
|
||||||
for testing.
|
for testing.
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Certificate name from browser
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
@ -21,7 +21,7 @@ first step of [installation](README.md#the-long-way-in-detail) is importing
|
||||||
the certificate.
|
the certificate.
|
||||||
|
|
||||||
The scripts can install additional certificates when required. This happens
|
The scripts can install additional certificates when required. This happens
|
||||||
from this repository if available, or from [mkcert.org ↗️](https://mkcert.org)
|
from this repository if available, or from [mkcert.org](https://mkcert.org)
|
||||||
as a fallback.
|
as a fallback.
|
||||||
|
|
||||||
Get the certificate's CommonName
|
Get the certificate's CommonName
|
||||||
|
|
@ -29,7 +29,7 @@ Get the certificate's CommonName
|
||||||
|
|
||||||
But how to determine what certificate may be required? Often easiest way
|
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
|
is to use a desktop browser to get that information. This demonstration uses
|
||||||
[Mozilla Firefox ↗️](https://www.mozilla.org/firefox/).
|
[Mozilla Firefox](https://www.mozilla.org/firefox/).
|
||||||
|
|
||||||
Let's assume we want to make sure the certificate for
|
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
|
[git.eworm.de](https://git.eworm.de/) is available. Open that page in the
|
||||||
|
|
@ -61,7 +61,7 @@ Import a certificate by CommonName
|
||||||
Running the function `$CertificateAvailable` with that name as parameter
|
Running the function `$CertificateAvailable` with that name as parameter
|
||||||
makes sure the certificate is available in the device's store:
|
makes sure the certificate is available in the device's store:
|
||||||
|
|
||||||
$CertificateAvailable "ISRG Root X2" "fetch";
|
$CertificateAvailable "ISRG Root X2";
|
||||||
|
|
||||||
If the certificate is actually available already nothing happens, and there
|
If the certificate is actually available already nothing happens, and there
|
||||||
is no output. Otherwise the certificate is downloaded and imported.
|
is no output. Otherwise the certificate is downloaded and imported.
|
||||||
|
|
@ -74,7 +74,6 @@ See also
|
||||||
|
|
||||||
* [Download, import and update firewall address-lists](doc/fw-addr-lists.md)
|
* [Download, import and update firewall address-lists](doc/fw-addr-lists.md)
|
||||||
* [Manage DNS and DoH servers from netwatch](doc/netwatch-dns.md)
|
* [Manage DNS and DoH servers from netwatch](doc/netwatch-dns.md)
|
||||||
* [Send notifications via Gotify](doc/mod/notification-gotify.md)
|
|
||||||
* [Send notifications via Matrix](doc/mod/notification-matrix.md)
|
* [Send notifications via Matrix](doc/mod/notification-matrix.md)
|
||||||
* [Send notifications via Ntfy](doc/mod/notification-ntfy.md)
|
* [Send notifications via Ntfy](doc/mod/notification-ntfy.md)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Past Contributions
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
@ -21,8 +21,6 @@ for details!
|
||||||
* [Ben Harris](mailto:mail@bharr.is) (@bharrisau)
|
* [Ben Harris](mailto:mail@bharr.is) (@bharrisau)
|
||||||
* [Daniel Ziegenberg](mailto:daniel@ziegenberg.at) (@ziegenberg)
|
* [Daniel Ziegenberg](mailto:daniel@ziegenberg.at) (@ziegenberg)
|
||||||
* [Ignacio Serrano](mailto:ignic@ignic.com) (@ignic)
|
* [Ignacio Serrano](mailto:ignic@ignic.com) (@ignic)
|
||||||
* [Ilya Kulakov](mailto:kulakov.ilya@gmail.com) (@Kentzo)
|
|
||||||
* [Leonardo David Monteiro](mailto:leo@cub3.xyz) (@leosfsm)
|
|
||||||
* [Michael Gisbers](mailto:michael@gisbers.de) (@mgisbers)
|
* [Michael Gisbers](mailto:michael@gisbers.de) (@mgisbers)
|
||||||
* [Miquel Bonastre](mailto:mbonastre@yahoo.com) (@mbonastre)
|
* [Miquel Bonastre](mailto:mbonastre@yahoo.com) (@mbonastre)
|
||||||
* @netravnen
|
* @netravnen
|
||||||
|
|
@ -32,10 +30,9 @@ for details!
|
||||||
## Donations
|
## Donations
|
||||||
|
|
||||||
Add yourself to the list,
|
Add yourself to the list,
|
||||||
[donate with PayPal ↗️](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)!
|
[donate with PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)!
|
||||||
|
|
||||||
* Abdul Mannan Abbasi
|
* Abdul Mannan Abbasi
|
||||||
* Alex Maier
|
|
||||||
* Andrea Ruffini Perico
|
* Andrea Ruffini Perico
|
||||||
* Andrew Cox
|
* Andrew Cox
|
||||||
* Christoph Boss (@Kampfwurst)
|
* Christoph Boss (@Kampfwurst)
|
||||||
|
|
|
||||||
63
DEBUG.md
|
|
@ -1,63 +0,0 @@
|
||||||
Debug output and logs
|
|
||||||
=====================
|
|
||||||
|
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
|
||||||
[](https://t.me/routeros_scripts)
|
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
|
||||||
|
|
||||||
[⬅️ Go back to main README](README.md)
|
|
||||||
|
|
||||||
Sometimes scripts do not behave as expected. In these cases debug output
|
|
||||||
or logs can help.
|
|
||||||
|
|
||||||
## Debug output
|
|
||||||
|
|
||||||
Run this command in a terminal:
|
|
||||||
|
|
||||||
:set PrintDebug true;
|
|
||||||
|
|
||||||
You will then see debug output when running the script from terminal.
|
|
||||||
|
|
||||||
To revert to default output run:
|
|
||||||
|
|
||||||
:set PrintDebug false;
|
|
||||||
|
|
||||||
### Debug output for specific script
|
|
||||||
|
|
||||||
Even having debug output for a specific script or function only (or a
|
|
||||||
set of) is possible. To enable debug output for `telegram-chat` run:
|
|
||||||
|
|
||||||
:set ($PrintDebugOverride->"telegram-chat") true;
|
|
||||||
|
|
||||||
## Debug logs
|
|
||||||
|
|
||||||
The debug info can go to system log. To make it show up in `memory` run:
|
|
||||||
|
|
||||||
/system/logging/add topics=script,debug action=memory;
|
|
||||||
|
|
||||||
Other actions (`disk`, `email`, `remote` or `support`) can be used as
|
|
||||||
well. I do not recommend using `echo` - use [debug output](#debug-output)
|
|
||||||
instead.
|
|
||||||
|
|
||||||
Disable or remove that setting to restore regular logging.
|
|
||||||
|
|
||||||
## Verbose output
|
|
||||||
|
|
||||||
Specific scripts can generate huge amount of output. These do use a function
|
|
||||||
`$LogPrintVerbose`, which is declared, but has no code, intentionally.
|
|
||||||
|
|
||||||
If you *really* want that output set the function to be the same as
|
|
||||||
`$LogPrint`:
|
|
||||||
|
|
||||||
:set LogPrintVerbose $LogPrint;
|
|
||||||
|
|
||||||
To revert that change just run:
|
|
||||||
|
|
||||||
:set LogPrintVerbose;
|
|
||||||
|
|
||||||
---
|
|
||||||
[⬅️ Go back to main README](README.md)
|
|
||||||
[⬆️ Go back to top](#top)
|
|
||||||
|
|
@ -4,52 +4,36 @@ Initial commands
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
[⬅️ Go back to main README](README.md)
|
[⬅️ Go back to main README](README.md)
|
||||||
|
|
||||||
> ⚠️ **Warning**: These commands are intended for initial setup. If you are
|
> ⚠️ **Warning**: These command are inteneded for initial setup. If you are
|
||||||
> not aware of the procedure please follow
|
> not aware of the procedure please follow
|
||||||
> [the long way in detail](README.md#the-long-way-in-detail).
|
> [the long way in detail](README.md#the-long-way-in-detail).
|
||||||
|
|
||||||
Run the complete base installation:
|
Run the complete base installation:
|
||||||
|
|
||||||
{
|
{
|
||||||
:local BaseUrl "https://rsc.eworm.de/main/";
|
/tool/fetch "https://git.eworm.de/cgit/routeros-scripts/plain/certs/ISRG-Root-X2.pem" dst-path="isrg-root-x2.pem" as-value;
|
||||||
:local CertCommonName "ISRG Root X2";
|
:delay 1s;
|
||||||
:local CertFileName "ISRG-Root-X2.pem";
|
/certificate/import file-name=isrg-root-x2.pem passphrase="";
|
||||||
:local CertFingerprint "69729b8e15a86efc177a57afb7171dfc64add28c2fca8cf1507e34453ccb1470";
|
:if ([ :len [ /certificate/find where fingerprint="69729b8e15a86efc177a57afb7171dfc64add28c2fca8cf1507e34453ccb1470" ] ] != 1) do={
|
||||||
|
:error "Something is wrong with your certificates!";
|
||||||
:local CertSettings [ /certificate/settings/get ];
|
|
||||||
:if (!((($CertSettings->"builtin-trust-anchors") = "trusted" || \
|
|
||||||
($CertSettings->"builtin-trust-store") ~ "fetch" || \
|
|
||||||
($CertSettings->"builtin-trust-store") = "all") && \
|
|
||||||
[[ :parse (":return [ :len [ /certificate/builtin/find where common-name=\"" . $CertCommonName . "\" ] ]") ]] > 0)) do={
|
|
||||||
:put "Importing certificate...";
|
|
||||||
/tool/fetch ($BaseUrl . "certs/" . $CertFileName) dst-path=$CertFileName as-value;
|
|
||||||
:delay 1s;
|
|
||||||
/certificate/import file-name=$CertFileName passphrase="";
|
|
||||||
:if ([ :len [ /certificate/find where fingerprint=$CertFingerprint ] ] != 1) do={
|
|
||||||
:error "Something is wrong with your certificates!";
|
|
||||||
};
|
|
||||||
:delay 1s;
|
|
||||||
};
|
};
|
||||||
:put "Renaming global-config-overlay, if exists...";
|
:delay 1s;
|
||||||
/system/script/set name=("global-config-overlay-" . [ /system/clock/get date ] . "-" . [ /system/clock/get time ]) [ find where name="global-config-overlay" ];
|
/system/script/set name=("global-config-overlay-" . [ /system/clock/get date ] . "-" . [ /system/clock/get time ]) [ find where name="global-config-overlay" ];
|
||||||
:foreach Script in={ "global-config"; "global-config-overlay"; "global-functions" } do={
|
:foreach Script in={ "global-config"; "global-config-overlay"; "global-functions" } do={
|
||||||
:put "Installing $Script...";
|
|
||||||
/system/script/remove [ find where name=$Script ];
|
/system/script/remove [ find where name=$Script ];
|
||||||
/system/script/add name=$Script owner=$Script source=([ /tool/fetch check-certificate=yes-without-crl ($BaseUrl . $Script . ".rsc") output=user as-value ]->"data");
|
/system/script/add name=$Script owner=$Script source=([ /tool/fetch check-certificate=yes-without-crl ("https://git.eworm.de/cgit/routeros-scripts/plain/" . $Script . ".rsc") output=user as-value]->"data");
|
||||||
};
|
};
|
||||||
:put "Loading configuration and functions...";
|
|
||||||
/system/script { run global-config; run global-functions; };
|
/system/script { run global-config; run global-functions; };
|
||||||
:if ([ :len [ /certificate/find where fingerprint=$CertFingerprint ] ] > 0) do={
|
/system/scheduler/remove [ find where name="global-scripts" ];
|
||||||
:put "Renaming certificate by its common-name...";
|
/system/scheduler/add name="global-scripts" start-time=startup on-event="/system/script { run global-config; run global-functions; }";
|
||||||
:global CertificateNameByCN;
|
:global CertificateNameByCN;
|
||||||
$CertificateNameByCN $CertFingerprint;
|
$CertificateNameByCN "ISRG Root X2";
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Then continue setup with
|
Then continue setup with
|
||||||
|
|
|
||||||
58
Makefile
|
|
@ -2,45 +2,35 @@
|
||||||
# template scripts -> final scripts
|
# template scripts -> final scripts
|
||||||
# markdown files -> html files
|
# markdown files -> html files
|
||||||
|
|
||||||
ALL_RSC := $(wildcard *.rsc */*.rsc)
|
CAPSMAN = $(wildcard *.capsman.rsc)
|
||||||
GEN_RSC := $(wildcard *.capsman.rsc *.local.rsc *.wifi.rsc)
|
LOCAL = $(wildcard *.local.rsc)
|
||||||
|
WIFI = $(wildcard *.wifi.rsc)
|
||||||
|
|
||||||
MARKDOWN := $(wildcard *.md doc/*.md doc/mod/*.md)
|
MARKDOWN = $(wildcard *.md doc/*.md doc/mod/*.md)
|
||||||
HTML := $(MARKDOWN:.md=.html)
|
HTML = $(MARKDOWN:.md=.html)
|
||||||
|
|
||||||
DATE ?= $(shell date --rfc-email)
|
all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML)
|
||||||
VERSION ?= $(shell git symbolic-ref --short HEAD 2>/dev/null)/$(shell git rev-list --count HEAD 2>/dev/null)/$(shell git rev-parse --short=8 HEAD 2>/dev/null)
|
|
||||||
export DATE VERSION
|
|
||||||
|
|
||||||
.PHONY: all checksums commitinfo docs rsc clean
|
%.html: %.md Makefile
|
||||||
|
markdown $< | sed 's/href="\([-_\./[:alnum:]]*\)\.md"/href="\1.html"/g' > $@
|
||||||
|
|
||||||
all: checksums docs rsc
|
%.capsman.rsc: %.template.rsc Makefile
|
||||||
|
sed -e '/\/interface\/wifi\//d' -e '/\/interface\/wireless\//d' -e 's|%TEMPL%|.capsman|' \
|
||||||
|
-e '/^# NOT \/caps-man\/ #$$/,/^# NOT \/caps-man\/ #$$/d' \
|
||||||
|
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
|
||||||
|
< $< > $@
|
||||||
|
|
||||||
checksums: checksums.json
|
%.local.rsc: %.template.rsc Makefile
|
||||||
|
sed -e '/\/caps-man\//d' -e '/\/interface\/wifi\//d' -e 's|%TEMPL%|.local|' \
|
||||||
|
-e '/^# NOT \/interface\/wireless\/ #$$/,/^# NOT \/interface\/wireless\/ #$$/d' \
|
||||||
|
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
|
||||||
|
< $< > $@
|
||||||
|
|
||||||
checksums.json: contrib/checksums.sh $(ALL_RSC)
|
%.wifi.rsc: %.template.rsc Makefile
|
||||||
contrib/checksums.sh > $@
|
sed -e '/\/caps-man\//d' -e '/\/interface\/wireless\//d' -e 's|%TEMPL%|.wifi|' \
|
||||||
|
-e '/^# NOT \/interface\/wifi\/ #$$/,/^# NOT \/interface\/wifi\/ #$$/d' \
|
||||||
commitinfo: global-functions.rsc
|
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
|
||||||
contrib/commitinfo.sh $< > $<~
|
< $< > $@
|
||||||
mv $<~ $<
|
|
||||||
|
|
||||||
docs: $(HTML)
|
|
||||||
|
|
||||||
%.html: %.md general/style.css contrib/html.sh contrib/html.sh.d/head.html contrib/html.sh.d/foot.html
|
|
||||||
contrib/html.sh $< > $@
|
|
||||||
|
|
||||||
rsc: $(GEN_RSC)
|
|
||||||
|
|
||||||
%.capsman.rsc: %.template.rsc contrib/template-capsman.sh
|
|
||||||
contrib/template-capsman.sh $< > $@
|
|
||||||
|
|
||||||
%.local.rsc: %.template.rsc contrib/template-local.sh
|
|
||||||
contrib/template-local.sh $< > $@
|
|
||||||
|
|
||||||
%.wifi.rsc: %.template.rsc contrib/template-wifi.sh
|
|
||||||
contrib/template-wifi.sh $< > $@
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(HTML) checksums.json
|
rm -f $(HTML)
|
||||||
make -C contrib/ clean
|
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 3.7 KiB |
BIN
README.d/05-run-and-schedule-scripts.avif
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 6 KiB After Width: | Height: | Size: 5 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 4 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 207 B |
228
README.md
|
|
@ -4,22 +4,19 @@ RouterOS Scripts
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
**a collection of scripts for MikroTik RouterOS**
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
[RouterOS ↗️](https://mikrotik.com/software) is the operating system developed
|
[RouterOS](https://mikrotik.com/software) is the operating system developed
|
||||||
by [MikroTik ↗️](https://mikrotik.com/aboutus) for networking tasks. This
|
by [MikroTik](https://mikrotik.com/aboutus) for networking tasks. This
|
||||||
repository holds a number of [scripts ↗️](https://wiki.mikrotik.com/wiki/Manual:Scripting)
|
repository holds a number of [scripts](https://wiki.mikrotik.com/wiki/Manual:Scripting)
|
||||||
to manage RouterOS devices or extend their functionality.
|
to manage RouterOS devices or extend their functionality.
|
||||||
|
|
||||||
*Use at your own risk*, pay attention to
|
*Use at your own risk*, pay attention to
|
||||||
[license and warranty](#license-and-warranty), and
|
[license and warranty](#license-and-warranty)!
|
||||||
[disclaimer on external links](#disclaimer-on-external-links)!
|
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
|
@ -27,38 +24,18 @@ Requirements
|
||||||
### Software (RouterOS)
|
### Software (RouterOS)
|
||||||
|
|
||||||
Latest version of the scripts require recent RouterOS to function properly.
|
Latest version of the scripts require recent RouterOS to function properly.
|
||||||
Make sure to install latest updates before you begin. This is supposed to
|
Make sure to install latest updates before you begin. If new functionality
|
||||||
work flawlessly with these channels:
|
or a breaking change in RouterOS `7.n` is used in my scripts I push my
|
||||||
|
change some time after `7.(n+1)` was released. At any time you should have
|
||||||
|
at least two minor and their bugfix releases to choose from.
|
||||||
|
|
||||||
* `stable` - the latest version considered stable for daily use, including
|
Specific scripts may require even newer RouterOS version.
|
||||||
new features
|
|
||||||
* `long-term` - a version considered rock-solid, usually one minor version
|
|
||||||
behind `stable` (`7.(n-1)`)
|
|
||||||
|
|
||||||
New functionality or breaking changes in RouterOS are adopted fairly quick.
|
|
||||||
These changes are pushed for general availability once a version of
|
|
||||||
RouterOS supporting this had been released to the `long-term` channel a
|
|
||||||
reasonable time ago.
|
|
||||||
|
|
||||||
At any time you should have at least two minor versions and their bugfix
|
|
||||||
releases to choose from. Often way older versions of RouterOS work just
|
|
||||||
fine.
|
|
||||||
|
|
||||||
On the other hand in seldom cases and for good reasons *specific* scripts
|
|
||||||
may require an even newer RouterOS version, so only `stable` is supported
|
|
||||||
temporarily.
|
|
||||||
|
|
||||||
> 💡️ **Hint**: If in doubt have a look at the badge at the top of each
|
|
||||||
> page showing the minimum version required:
|
|
||||||
> 
|
|
||||||
|
|
||||||
> ℹ️ **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!
|
||||||
|
|
||||||
#### Prerequisite configuration
|
|
||||||
|
|
||||||
Starting with RouterOS 7.17 the
|
Starting with RouterOS 7.17 the
|
||||||
[device-mode ↗️](https://help.mikrotik.com/docs/spaces/ROS/pages/93749258/Device-mode)
|
[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
|
has been extended to give more fine-grained control over what features are
|
||||||
available. You need to enable `scheduler` and `fetch` at least, specific
|
available. You need to enable `scheduler` and `fetch` at least, specific
|
||||||
scripts may require additional features.
|
scripts may require additional features.
|
||||||
|
|
@ -77,19 +54,16 @@ Initial setup
|
||||||
### Get me ready!
|
### Get me ready!
|
||||||
|
|
||||||
If you know how things work just copy and paste the
|
If you know how things work just copy and paste the
|
||||||
[initial commands](INITIAL-COMMANDS.md). These also support fixing an
|
[initial commands](INITIAL-COMMANDS.md). Remember to edit and rerun
|
||||||
existing but broken installation. Remember to edit and rerun
|
|
||||||
`global-config-overlay`!
|
`global-config-overlay`!
|
||||||
|
First time users should take the long way below.
|
||||||
> 💡️ **Hint**: First time users should take
|
|
||||||
> [the long way in detail](#the-long-way-in-detail) below.
|
|
||||||
|
|
||||||
### Live presentation
|
### Live presentation
|
||||||
|
|
||||||
Want to see it in action? I've had a presentation [Repository based
|
Want to see it in action? I've had a presentation [Repository based
|
||||||
RouterOS script distribution ↗️](https://www.youtube.com/watch?v=B9neG3oAhcY)
|
RouterOS script distribution](https://www.youtube.com/watch?v=B9neG3oAhcY)
|
||||||
including demonstration recorded live at [MUM Europe
|
including demonstation recorded live at [MUM Europe
|
||||||
2019 ↗️](https://mum.mikrotik.com/2019/EU/) in Vienna.
|
2019](https://mum.mikrotik.com/2019/EU/) in Vienna.
|
||||||
|
|
||||||
> ⚠️ **Warning**: Some details changed. So see the presentation, then follow
|
> ⚠️ **Warning**: Some details changed. So see the presentation, then follow
|
||||||
> the steps below for up-to-date commands.
|
> the steps below for up-to-date commands.
|
||||||
|
|
@ -97,22 +71,11 @@ including demonstration recorded live at [MUM Europe
|
||||||
### The long way in detail
|
### The long way in detail
|
||||||
|
|
||||||
The update script does server certificate verification, so first step is to
|
The update script does server certificate verification, so first step is to
|
||||||
download the certificates.
|
download the certificates. If you intend to download the scripts from a
|
||||||
|
|
||||||
> 💡️ **Hint**: RouterOS 7.19 comes with a builtin certificate store. You
|
|
||||||
> can skip the steps regarding certificate download and import and jump
|
|
||||||
> to [installation of scripts](#installation-of-scripts) if you set the
|
|
||||||
> trust for these builtin trust anchors:
|
|
||||||
> `/certificate/settings/set builtin-trust-anchors=trusted;`
|
|
||||||
> With RouterOS 7.21 the functionality was changed. Set this at minimum,
|
|
||||||
> but make sure not to drop other targets:
|
|
||||||
> `/certificate/settings/set builtin-trust-store=fetch;`
|
|
||||||
|
|
||||||
If you intend to download the scripts from a
|
|
||||||
different location (for example from github.com) install the corresponding
|
different location (for example from github.com) install the corresponding
|
||||||
certificate chain.
|
certificate chain.
|
||||||
|
|
||||||
/tool/fetch "https://rsc.eworm.de/main/certs/ISRG-Root-X2.pem" dst-path="isrg-root-x2.pem";
|
/tool/fetch "https://git.eworm.de/cgit/routeros-scripts/plain/certs/ISRG-Root-X2.pem" dst-path="isrg-root-x2.pem";
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
@ -120,11 +83,11 @@ Note that the commands above do *not* verify server certificate, so if you
|
||||||
want to be safe download with your workstations's browser and transfer the
|
want to be safe download with your workstations's browser and transfer the
|
||||||
file to your MikroTik device.
|
file to your MikroTik device.
|
||||||
|
|
||||||
* [ISRG Root X2 ↗️](https://letsencrypt.org/certs/isrg-root-x2.pem)
|
* [ISRG Root X2](https://letsencrypt.org/certs/isrg-root-x2.pem)
|
||||||
|
|
||||||
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.
|
||||||
|
|
@ -142,27 +105,22 @@ is shown.
|
||||||
|
|
||||||
Always make sure there are no certificates installed you do not know or want!
|
Always make sure there are no certificates installed you do not know or want!
|
||||||
|
|
||||||
#### Installation of scripts
|
|
||||||
|
|
||||||
All following commands will verify the server certificate. For validity the
|
All following commands will verify the server certificate. For validity the
|
||||||
certificate's lifetime is checked with local time, so make sure the device's
|
certificate's lifetime is checked with local time, so make sure the device's
|
||||||
date and time is set correctly!
|
date and time is set correctly!
|
||||||
|
|
||||||
Now let's download the main scripts and add them in configuration on the fly.
|
Now let's download the main scripts and add them in configuration on the fly.
|
||||||
|
|
||||||
:foreach Script in={ "global-config"; "global-config-overlay"; "global-functions" } do={ /system/script/add name=$Script owner=$Script source=([ /tool/fetch check-certificate=yes-without-crl ("https://rsc.eworm.de/main/" . $Script . ".rsc") output=user as-value ]->"data"); };
|
:foreach Script in={ "global-config"; "global-config-overlay"; "global-functions" } do={ /system/script/add name=$Script owner=$Script source=([ /tool/fetch check-certificate=yes-without-crl ("https://git.eworm.de/cgit/routeros-scripts/plain/" . $Script . ".rsc") output=user as-value]->"data"); };
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
And finally run configuration and functions. This will also add the
|
And finally load configuration and functions and add the scheduler.
|
||||||
scheduler for loading at system startup automatically.
|
|
||||||
|
|
||||||
/system/script { run global-config; run global-functions; };
|
/system/script { run global-config; run global-functions; };
|
||||||
|
/system/scheduler/add name="global-scripts" start-time=startup on-event="/system/script { run global-config; run global-functions; }";
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
> 💡️ **Hint**: You see complaints regarding syntax errors? Most likely the
|
|
||||||
> RouterOS on your device is too old. Check for updates!
|
|
||||||
|
|
||||||
### Scheduled automatic updates
|
### Scheduled automatic updates
|
||||||
|
|
||||||
|
|
@ -233,7 +191,7 @@ Scheduler and events
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
Most scripts are designed to run regularly from
|
Most scripts are designed to run regularly from
|
||||||
[scheduler ↗️](https://wiki.mikrotik.com/wiki/Manual:System/Scheduler). We just
|
[scheduler](https://wiki.mikrotik.com/wiki/Manual:System/Scheduler). We just
|
||||||
added `check-routeros-update`, so let's run it daily to make sure not to
|
added `check-routeros-update`, so let's run it daily to make sure not to
|
||||||
miss an update.
|
miss an update.
|
||||||
|
|
||||||
|
|
@ -247,7 +205,7 @@ cleanup add a scheduler entry.
|
||||||
|
|
||||||
$ScriptInstallUpdate dhcp-to-dns,lease-script;
|
$ScriptInstallUpdate dhcp-to-dns,lease-script;
|
||||||
/ip/dhcp-server/set lease-script=lease-script [ find ];
|
/ip/dhcp-server/set lease-script=lease-script [ find ];
|
||||||
/system/scheduler/add name="dhcp-to-dns" interval=5m start-time=startup on-event="/system/script/run dhcp-to-dns;";
|
/system/scheduler/add name="dhcp-to-dns" interval=5m on-event="/system/script/run dhcp-to-dns;";
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
@ -256,62 +214,60 @@ There's much more to explore... Have fun!
|
||||||
Available scripts
|
Available scripts
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
* [Find and remove access list duplicates](doc/accesslist-duplicates.md) (`accesslist-duplicates`)
|
* [Find and remove access list duplicates](doc/accesslist-duplicates.md)
|
||||||
* [Upload backup to Mikrotik cloud](doc/backup-cloud.md) (`backup-cloud`)
|
* [Upload backup to Mikrotik cloud](doc/backup-cloud.md)
|
||||||
* [Send backup via e-mail](doc/backup-email.md) (`backup-email`)
|
* [Send backup via e-mail](doc/backup-email.md)
|
||||||
* [Save configuration to fallback partition](doc/backup-partition.md) (`backup-partition`)
|
* [Save configuration to fallback partition](doc/backup-partition.md)
|
||||||
* [Upload backup to server](doc/backup-upload.md) (`backup-upload`)
|
* [Upload backup to server](doc/backup-upload.md)
|
||||||
* [Download packages for CAP upgrade from CAPsMAN](doc/capsman-download-packages.md) (`capsman-download-packages`)
|
* [Download packages for CAP upgrade from CAPsMAN](doc/capsman-download-packages.md)
|
||||||
* [Run rolling CAP upgrades from CAPsMAN](doc/capsman-rolling-upgrade.md) (`capsman-rolling-upgrade`)
|
* [Run rolling CAP upgrades from CAPsMAN](doc/capsman-rolling-upgrade.md)
|
||||||
* [Renew locally issued certificates](doc/certificate-renew-issued.md) (`certificate-renew-issued`)
|
* [Renew locally issued certificates](doc/certificate-renew-issued.md)
|
||||||
* [Renew certificates and notify on expiration](doc/check-certificates.md) (`check-certificates`)
|
* [Renew certificates and notify on expiration](doc/check-certificates.md)
|
||||||
* [Notify about health state](doc/check-health.md) (`check-health`)
|
* [Notify about health state](doc/check-health.md)
|
||||||
* [Notify on LTE firmware upgrade](doc/check-lte-firmware-upgrade.md) (`check-lte-firmware-upgrade`)
|
* [Notify on LTE firmware upgrade](doc/check-lte-firmware-upgrade.md)
|
||||||
* [Check perpetual license on CHR](doc/check-perpetual-license.md) (`check-perpetual-license`)
|
* [Notify on RouterOS update](doc/check-routeros-update.md)
|
||||||
* [Notify on RouterOS update](doc/check-routeros-update.md) (`check-routeros-update`)
|
* [Collect MAC addresses in wireless access list](doc/collect-wireless-mac.md)
|
||||||
* [Collect MAC addresses in wireless access list](doc/collect-wireless-mac.md) (`collect-wireless-mac`)
|
* [Use wireless network with daily psk](doc/daily-psk.md)
|
||||||
* [Use wireless network with daily psk](doc/daily-psk.md) (`daily-psk`)
|
* [Comment DHCP leases with info from access list](doc/dhcp-lease-comment.md)
|
||||||
* [Comment DHCP leases with info from access list](doc/dhcp-lease-comment.md) (`dhcp-lease-comment`)
|
* [Create DNS records for DHCP leases](doc/dhcp-to-dns.md)
|
||||||
* [Create DNS records for DHCP leases](doc/dhcp-to-dns.md) (`dhcp-to-dns`)
|
* [Automatically upgrade firmware and reboot](doc/firmware-upgrade-reboot.md)
|
||||||
* [Automatically upgrade firmware and reboot](doc/firmware-upgrade-reboot.md) (`firmware-upgrade-reboot`)
|
* [Download, import and update firewall address-lists](doc/fw-addr-lists.md)
|
||||||
* [Download, import and update firewall address-lists](doc/fw-addr-lists.md) (`fw-addr-lists`)
|
* [Wait for global functions und modules](doc/global-wait.md)
|
||||||
* [Wait for global functions und modules](doc/global-wait.md) (`global-wait`)
|
* [Send GPS position to server](doc/gps-track.md)
|
||||||
* [Send GPS position to server](doc/gps-track.md) (`gps-track`)
|
* [Use WPA network with hotspot credentials](doc/hotspot-to-wpa.md)
|
||||||
* [Use WPA network with hotspot credentials](doc/hotspot-to-wpa.md) (`hotspot-to-wpa` & `hotspot-to-wpa-cleanup`)
|
* [Create DNS records for IPSec peers](doc/ipsec-to-dns.md)
|
||||||
* [Create DNS records for IPSec peers](doc/ipsec-to-dns.md) (`ipsec-to-dns`)
|
* [Update configuration on IPv6 prefix change](doc/ipv6-update.md)
|
||||||
* [Update configuration on IPv6 prefix change](doc/ipv6-update.md) (`ipv6-update`)
|
* [Manage IP addresses with bridge status](doc/ip-addr-bridge.md)
|
||||||
* [Manage IP addresses with bridge status](doc/ip-addr-bridge.md) (`ip-addr-bridge`)
|
* [Run other scripts on DHCP lease](doc/lease-script.md)
|
||||||
* [Run other scripts on DHCP lease](doc/lease-script.md) (`lease-script`)
|
* [Manage LEDs dark mode](doc/leds-mode.md)
|
||||||
* [Manage LEDs dark mode](doc/leds-mode.md) (`leds-day-mode`, `leds-night-mode` & `leds-toggle-mode`)
|
* [Forward log messages via notification](doc/log-forward.md)
|
||||||
* [Forward log messages via notification](doc/log-forward.md) (`log-forward`)
|
* [Mode button with multiple presses](doc/mode-button.md)
|
||||||
* [Mode button with multiple presses](doc/mode-button.md) (`mode-button`)
|
* [Manage DNS and DoH servers from netwatch](doc/netwatch-dns.md)
|
||||||
* [Manage DNS and DoH servers from netwatch](doc/netwatch-dns.md) (`netwatch-dns`)
|
* [Notify on host up and down](doc/netwatch-notify.md)
|
||||||
* [Notify on host up and down](doc/netwatch-notify.md) (`netwatch-notify`)
|
* [Visualize OSPF state via LEDs](doc/ospf-to-leds.md)
|
||||||
* [Visualize OSPF state via LEDs](doc/ospf-to-leds.md) (`ospf-to-leds`)
|
* [Manage system update](doc/packages-update.md)
|
||||||
* [Manage system update](doc/packages-update.md) (`packages-update`)
|
* [Run scripts on ppp connection](doc/ppp-on-up.md)
|
||||||
* [Run scripts on ppp connection](doc/ppp-on-up.md) (`ppp-on-up`)
|
* [Act on received SMS](doc/sms-action.md)
|
||||||
* [Act on received SMS](doc/sms-action.md) (`sms-action`)
|
* [Forward received SMS](doc/sms-forward.md)
|
||||||
* [Forward received SMS](doc/sms-forward.md) (`sms-forward`)
|
* [Play Super Mario theme](doc/super-mario-theme.md)
|
||||||
* [Play Super Mario theme](doc/super-mario-theme.md) (`super-mario-theme`)
|
* [Chat with your router and send commands via Telegram bot](doc/telegram-chat.md)
|
||||||
* [Chat with your router and send commands via Telegram bot](doc/telegram-chat.md) (`telegram-chat`)
|
* [Install LTE firmware upgrade](doc/unattended-lte-firmware-upgrade.md)
|
||||||
* [Install LTE firmware upgrade](doc/unattended-lte-firmware-upgrade.md) (`unattended-lte-firmware-upgrade`)
|
* [Update GRE configuration with dynamic addresses](doc/update-gre-address.md)
|
||||||
* [Update GRE configuration with dynamic addresses](doc/update-gre-address.md) (`update-gre-address`)
|
* [Update tunnelbroker configuration](doc/update-tunnelbroker.md)
|
||||||
* [Update tunnelbroker configuration](doc/update-tunnelbroker.md) (`update-tunnelbroker`)
|
|
||||||
|
|
||||||
Available modules
|
Available modules
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
* [Manage ports in bridge](doc/mod/bridge-port-to.md) (`mod/bridge-port-to`)
|
* [Manage ports in bridge](doc/mod/bridge-port-to.md)
|
||||||
* [Manage VLANs on bridge ports](doc/mod/bridge-port-vlan.md) (`mod/bridge-port-vlan`)
|
* [Manage VLANs on bridge ports](doc/mod/bridge-port-vlan.md)
|
||||||
* [Inspect variables](doc/mod/inspectvar.md) (`mod/inspectvar`)
|
* [Inspect variables](doc/mod/inspectvar.md)
|
||||||
* [IP address calculation](doc/mod/ipcalc.md) (`mod/ipcalc`)
|
* [IP address calculation](doc/mod/ipcalc.md)
|
||||||
* [Send notifications via e-mail](doc/mod/notification-email.md) (`mod/notification-email`)
|
* [Send notifications via e-mail](doc/mod/notification-email.md)
|
||||||
* [Send notifications via Gotify](doc/mod/notification-gotify.md) (`mod/notification-gotify`)
|
* [Send notifications via Matrix](doc/mod/notification-matrix.md)
|
||||||
* [Send notifications via Matrix](doc/mod/notification-matrix.md) (`mod/notification-matrix`)
|
* [Send notifications via Ntfy](doc/mod/notification-ntfy.md)
|
||||||
* [Send notifications via Ntfy](doc/mod/notification-ntfy.md) (`mod/notification-ntfy`)
|
* [Send notifications via Telegram](doc/mod/notification-telegram.md)
|
||||||
* [Send notifications via Telegram](doc/mod/notification-telegram.md) (`mod/notification-telegram`)
|
* [Download script and run it once](doc/mod/scriptrunonce.md)
|
||||||
* [Download script and run it once](doc/mod/scriptrunonce.md) (`mod/scriptrunonce`)
|
* [Import ssh keys for public key authentication](doc/mod/ssh-keys-import.md)
|
||||||
* [Import ssh keys for public key authentication](doc/mod/ssh-keys-import.md) (`mod/ssh-keys-import`)
|
|
||||||
|
|
||||||
Installing custom scripts & modules
|
Installing custom scripts & modules
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
@ -368,7 +324,7 @@ Possibly a scheduler and other configuration has to be removed as well.
|
||||||
Contact
|
Contact
|
||||||
-------
|
-------
|
||||||
|
|
||||||
We have a Telegram Group [RouterOS-Scripts ↗️](https://t.me/routeros_scripts)!
|
We have a Telegram Group [RouterOS-Scripts](https://t.me/routeros_scripts)!
|
||||||
|
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
|
|
||||||
|
|
@ -392,7 +348,7 @@ at github.
|
||||||
This project is developed in private spare time and usage is free of charge
|
This project is developed in private spare time and usage is free of charge
|
||||||
for you. If you like the scripts and think this is of value for you or your
|
for you. If you like the scripts and think this is of value for you or your
|
||||||
business please consider to
|
business please consider to
|
||||||
[donate with PayPal ↗️](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J).
|
[donate with PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J).
|
||||||
|
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
@ -411,33 +367,17 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
[GNU General Public License](COPYING.md) for more details.
|
[GNU General Public License](COPYING.md) for more details.
|
||||||
|
|
||||||
Disclaimer on external links
|
|
||||||
----------------------------
|
|
||||||
|
|
||||||
Our website contains links to the websites of third parties ("external
|
|
||||||
links"). As the content of these websites is not under our control, we
|
|
||||||
cannot assume any liability for such external content. In all cases, the
|
|
||||||
provider of information of the linked websites is liable for the content
|
|
||||||
and accuracy of the information provided. At the point in time when the
|
|
||||||
links were placed, no infringements of the law were recognisable to us.
|
|
||||||
As soon as an infringement of the law becomes known to us, we will
|
|
||||||
immediately remove the link in question.
|
|
||||||
|
|
||||||
> 💡️ **Hint**: All external links are marked with an arrow pointing
|
|
||||||
> diagonally in an up-right (or north-east) direction (↗️).
|
|
||||||
|
|
||||||
Upstream
|
Upstream
|
||||||
--------
|
--------
|
||||||
|
|
||||||
[rsc.eworm.de](https://rsc.eworm.de/)
|
[](https://rsc.eworm.de/)
|
||||||
|
|
||||||
[](https://rsc.eworm.de/)
|
URL:
|
||||||
|
[GitHub.com](https://github.com/eworm-de/routeros-scripts#routeros-scripts)
|
||||||
|
|
||||||
### Code hosting
|
Mirror:
|
||||||
|
[eworm.de](https://git.eworm.de/cgit/routeros-scripts/about/)
|
||||||
* [git.eworm.de](https://git.eworm.de/cgit/routeros-scripts/about/)
|
[GitLab.com](https://gitlab.com/eworm-de/routeros-scripts#routeros-scripts)
|
||||||
* [GitHub.com](https://github.com/eworm-de/routeros-scripts#routeros-scripts)
|
|
||||||
* [GitLab.com](https://gitlab.com/eworm-de/routeros-scripts#routeros-scripts)
|
|
||||||
|
|
||||||
---
|
---
|
||||||
[⬆️ Go back to top](#top)
|
[⬆️ Go back to top](#top)
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,20 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: accesslist-duplicates.capsman
|
# RouterOS script: accesslist-duplicates.capsman
|
||||||
# Copyright (c) 2018-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.17
|
# 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://rsc.eworm.de/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;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:local Seen ({});
|
:local Seen ({});
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
:foreach AccList in=[ /caps-man/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
|
:foreach AccList in=[ /caps-man/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
|
||||||
:local Mac [ /caps-man/access-list/get $AccList mac-address ];
|
:local Mac [ /caps-man/access-list/get $AccList mac-address ];
|
||||||
:if ($Seen->$Mac = 1) do={
|
:if ($Seen->$Mac = 1) do={
|
||||||
/caps-man/access-list/print without-paging where mac-address=$Mac;
|
/caps-man/access-list/print where mac-address=$Mac;
|
||||||
:local Remove [ :tonum [ /terminal/ask prompt="\nNumeric id to remove, any key to skip!" ] ];
|
:local Remove [ :tonum [ /terminal/ask prompt="\nNumeric id to remove, any key to skip!" ] ];
|
||||||
|
|
||||||
:if ([ :typeof $Remove ] = "num") do={
|
:if ([ :typeof $Remove ] = "num") do={
|
||||||
|
|
@ -32,6 +32,6 @@
|
||||||
}
|
}
|
||||||
:set ($Seen->$Mac) 1;
|
:set ($Seen->$Mac) 1;
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,20 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: accesslist-duplicates.local
|
# RouterOS script: accesslist-duplicates.local
|
||||||
# Copyright (c) 2018-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.17
|
# 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://rsc.eworm.de/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;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:local Seen ({});
|
:local Seen ({});
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
:foreach AccList in=[ /interface/wireless/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
|
:foreach AccList in=[ /interface/wireless/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
|
||||||
:local Mac [ /interface/wireless/access-list/get $AccList mac-address ];
|
:local Mac [ /interface/wireless/access-list/get $AccList mac-address ];
|
||||||
:if ($Seen->$Mac = 1) do={
|
:if ($Seen->$Mac = 1) do={
|
||||||
/interface/wireless/access-list/print without-paging where mac-address=$Mac;
|
/interface/wireless/access-list/print where mac-address=$Mac;
|
||||||
:local Remove [ :tonum [ /terminal/ask prompt="\nNumeric id to remove, any key to skip!" ] ];
|
:local Remove [ :tonum [ /terminal/ask prompt="\nNumeric id to remove, any key to skip!" ] ];
|
||||||
|
|
||||||
:if ([ :typeof $Remove ] = "num") do={
|
:if ([ :typeof $Remove ] = "num") do={
|
||||||
|
|
@ -32,6 +32,6 @@
|
||||||
}
|
}
|
||||||
:set ($Seen->$Mac) 1;
|
:set ($Seen->$Mac) 1;
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: accesslist-duplicates%TEMPL%
|
# RouterOS script: accesslist-duplicates%TEMPL%
|
||||||
# Copyright (c) 2018-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.17
|
# 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://rsc.eworm.de/doc/accesslist-duplicates.md
|
||||||
|
|
@ -11,11 +11,11 @@
|
||||||
# !! 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.
|
||||||
|
|
||||||
|
:global GlobalFunctionsReady;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:local Seen ({});
|
:local Seen ({});
|
||||||
|
|
@ -27,9 +27,9 @@
|
||||||
:local Mac [ /interface/wifi/access-list/get $AccList mac-address ];
|
:local Mac [ /interface/wifi/access-list/get $AccList mac-address ];
|
||||||
:local Mac [ /interface/wireless/access-list/get $AccList mac-address ];
|
:local Mac [ /interface/wireless/access-list/get $AccList mac-address ];
|
||||||
:if ($Seen->$Mac = 1) do={
|
:if ($Seen->$Mac = 1) do={
|
||||||
/caps-man/access-list/print without-paging where mac-address=$Mac;
|
/caps-man/access-list/print where mac-address=$Mac;
|
||||||
/interface/wifi/access-list/print without-paging where mac-address=$Mac;
|
/interface/wifi/access-list/print where mac-address=$Mac;
|
||||||
/interface/wireless/access-list/print without-paging where mac-address=$Mac;
|
/interface/wireless/access-list/print where mac-address=$Mac;
|
||||||
:local Remove [ :tonum [ /terminal/ask prompt="\nNumeric id to remove, any key to skip!" ] ];
|
:local Remove [ :tonum [ /terminal/ask prompt="\nNumeric id to remove, any key to skip!" ] ];
|
||||||
|
|
||||||
:if ([ :typeof $Remove ] = "num") do={
|
:if ([ :typeof $Remove ] = "num") do={
|
||||||
|
|
@ -41,6 +41,6 @@
|
||||||
}
|
}
|
||||||
:set ($Seen->$Mac) 1;
|
:set ($Seen->$Mac) 1;
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,20 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: accesslist-duplicates.wifi
|
# RouterOS script: accesslist-duplicates.wifi
|
||||||
# Copyright (c) 2018-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.17
|
# 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://rsc.eworm.de/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;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:local Seen ({});
|
:local Seen ({});
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
:foreach AccList in=[ /interface/wifi/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
|
:foreach AccList in=[ /interface/wifi/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
|
||||||
:local Mac [ /interface/wifi/access-list/get $AccList mac-address ];
|
:local Mac [ /interface/wifi/access-list/get $AccList mac-address ];
|
||||||
:if ($Seen->$Mac = 1) do={
|
:if ($Seen->$Mac = 1) do={
|
||||||
/interface/wifi/access-list/print without-paging where mac-address=$Mac;
|
/interface/wifi/access-list/print where mac-address=$Mac;
|
||||||
:local Remove [ :tonum [ /terminal/ask prompt="\nNumeric id to remove, any key to skip!" ] ];
|
:local Remove [ :tonum [ /terminal/ask prompt="\nNumeric id to remove, any key to skip!" ] ];
|
||||||
|
|
||||||
:if ([ :typeof $Remove ] = "num") do={
|
:if ([ :typeof $Remove ] = "num") do={
|
||||||
|
|
@ -32,6 +32,6 @@
|
||||||
}
|
}
|
||||||
:set ($Seen->$Mac) 1;
|
:set ($Seen->$Mac) 1;
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: backup-cloud
|
# RouterOS script: backup-cloud
|
||||||
# Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: backup-script, order=40
|
# provides: backup-script, order=40
|
||||||
# requires RouterOS, version=7.17
|
# requires RouterOS, version=7.14
|
||||||
#
|
#
|
||||||
# upload backup to MikroTik cloud
|
# upload backup to MikroTik cloud
|
||||||
# https://rsc.eworm.de/doc/backup-cloud.md
|
# https://rsc.eworm.de/doc/backup-cloud.md
|
||||||
|
|
||||||
|
:global GlobalFunctionsReady;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global BackupRandomDelay;
|
:global BackupRandomDelay;
|
||||||
|
|
@ -26,7 +26,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;
|
||||||
|
|
@ -98,7 +97,7 @@
|
||||||
$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";
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: backup-email
|
# RouterOS script: backup-email
|
||||||
# Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: backup-script, order=20
|
# provides: backup-script, order=20
|
||||||
# requires RouterOS, version=7.17
|
# 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://rsc.eworm.de/doc/backup-email.md
|
||||||
|
|
||||||
|
:global GlobalFunctionsReady;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global BackupPassword;
|
:global BackupPassword;
|
||||||
|
|
@ -27,7 +27,6 @@
|
||||||
|
|
||||||
:global CleanName;
|
:global CleanName;
|
||||||
:global DeviceInfo;
|
:global DeviceInfo;
|
||||||
:global FileExists;
|
|
||||||
:global FormatLine;
|
:global FormatLine;
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
:global MkDir;
|
:global MkDir;
|
||||||
|
|
@ -125,19 +124,17 @@
|
||||||
attach=$Attach; remove-attach=true });
|
attach=$Attach; remove-attach=true });
|
||||||
|
|
||||||
# wait for the mail to be sent
|
# wait for the mail to be sent
|
||||||
:do {
|
:local I 0;
|
||||||
:retry {
|
:while ([ :len [ /file/find where name ~ ($FilePath . "\\.(backup|rsc)\$") ] ] > 0) do={
|
||||||
:if ([ $FileExists ($FilePath . ".conf") ".conf file" ] = true || \
|
:if ($I >= 120) do={
|
||||||
[ $FileExists ($FilePath . ".backup") "backup" ] = true || \
|
$LogPrint warning $ScriptName ("Files are still available, sending e-mail failed.");
|
||||||
[ $FileExists ($FilePath . ".rsc") "script" ] = true) do={
|
:set PackagesUpdateBackupFailure true;
|
||||||
:error "Files are still available.";
|
:set ExitOK true;
|
||||||
}
|
:error false;
|
||||||
} delay=1s max=120;
|
}
|
||||||
} on-error={
|
:delay 1s;
|
||||||
$LogPrint warning $ScriptName ("Files are still available, sending e-mail failed.");
|
:set I ($I + 1);
|
||||||
:set PackagesUpdateBackupFailure true;
|
|
||||||
}
|
}
|
||||||
# do not remove the files here, as the mail is still queued!
|
} on-error={
|
||||||
} do={
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,20 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: backup-partition
|
# RouterOS script: backup-partition
|
||||||
# Copyright (c) 2022-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2022-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: backup-script, order=70
|
# provides: backup-script, order=70
|
||||||
# requires RouterOS, version=7.17
|
# requires RouterOS, version=7.14
|
||||||
# requires device-mode, scheduler
|
# requires device-mode, scheduler
|
||||||
#
|
#
|
||||||
# save configuration to fallback partition
|
# save configuration to fallback partition
|
||||||
# https://rsc.eworm.de/doc/backup-partition.md
|
# https://rsc.eworm.de/doc/backup-partition.md
|
||||||
|
|
||||||
|
:global GlobalFunctionsReady;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global BackupPartitionCopyBeforeFeatureUpdate;
|
:global BackupPartitionCopyBeforeFeatureUpdate;
|
||||||
|
|
@ -32,15 +32,14 @@
|
||||||
|
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
|
|
||||||
:onerror Err {
|
:do {
|
||||||
/partitions/copy-to $FallbackTo;
|
/partitions/copy-to $FallbackTo;
|
||||||
$LogPrint info $ScriptName ("Copied RouterOS to partition '" . $FallbackToName . "'.");
|
$LogPrint info $ScriptName ("Copied RouterOS to partition '" . $FallbackToName . "'.");
|
||||||
} do={
|
:return true;
|
||||||
$LogPrint error $ScriptName ("Failed copying RouterOS to partition '" . \
|
} on-error={
|
||||||
$FallbackToName . "': " . $Err);
|
$LogPrint error $ScriptName ("Failed copying RouterOS to partition '" . $FallbackToName . "'!");
|
||||||
:return false;
|
:return false;
|
||||||
}
|
}
|
||||||
:return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
|
|
@ -108,21 +107,20 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:onerror Err {
|
:do {
|
||||||
/system/scheduler/add start-time=startup name="running-from-backup-partition" \
|
/system/scheduler/add start-time=startup name="running-from-backup-partition" \
|
||||||
on-event=(":log warning (\"Running from partition '\" . " . \
|
on-event=(":log warning (\"Running from partition '\" . " . \
|
||||||
"[ /partitions/get [ find where running ] name ] . \"'!\")");
|
"[ /partitions/get [ find where running ] name ] . \"'!\")");
|
||||||
/partitions/save-config-to $FallbackTo;
|
/partitions/save-config-to $FallbackTo;
|
||||||
/system/scheduler/remove "running-from-backup-partition";
|
/system/scheduler/remove "running-from-backup-partition";
|
||||||
$LogPrint info $ScriptName ("Saved configuration to partition '" . $FallbackToName . "'.");
|
$LogPrint info $ScriptName ("Saved configuration to partition '" . $FallbackToName . "'.");
|
||||||
} do={
|
} on-error={
|
||||||
/system/scheduler/remove [ find where name="running-from-backup-partition" ];
|
/system/scheduler/remove [ find where name="running-from-backup-partition" ];
|
||||||
$LogPrint error $ScriptName ("Failed saving configuration to partition '" . \
|
$LogPrint error $ScriptName ("Failed saving configuration to partition '" . $FallbackToName . "'!");
|
||||||
$FallbackToName . "': " . $Err);
|
|
||||||
:set PackagesUpdateBackupFailure true;
|
:set PackagesUpdateBackupFailure true;
|
||||||
:set ExitOK true;
|
:set ExitOK true;
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,20 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: backup-upload
|
# RouterOS script: backup-upload
|
||||||
# Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: backup-script, order=50
|
# provides: backup-script, order=50
|
||||||
# requires RouterOS, version=7.17
|
# requires RouterOS, version=7.14
|
||||||
# requires device-mode, fetch
|
# 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://rsc.eworm.de/doc/backup-upload.md
|
||||||
|
|
||||||
|
:global GlobalFunctionsReady;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global BackupPassword;
|
:global BackupPassword;
|
||||||
|
|
@ -35,8 +35,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;
|
||||||
|
|
@ -90,18 +88,18 @@
|
||||||
/system/backup/save encryption=aes-sha256 name=$FilePath password=$BackupPassword;
|
/system/backup/save encryption=aes-sha256 name=$FilePath password=$BackupPassword;
|
||||||
$WaitForFile ($FilePath . ".backup");
|
$WaitForFile ($FilePath . ".backup");
|
||||||
|
|
||||||
:onerror Err {
|
:do {
|
||||||
/tool/fetch upload=yes url=($BackupUploadUrl . "/" . $FileName . ".backup") \
|
/tool/fetch upload=yes url=($BackupUploadUrl . "/" . $FileName . ".backup") \
|
||||||
user=$BackupUploadUser password=$BackupUploadPass src-path=($FilePath . ".backup");
|
user=$BackupUploadUser password=$BackupUploadPass src-path=($FilePath . ".backup");
|
||||||
:set BackupFile [ /file/get ($FilePath . ".backup") ];
|
:set BackupFile [ /file/get ($FilePath . ".backup") ];
|
||||||
:set ($BackupFile->"name") ($FileName . ".backup");
|
:set ($BackupFile->"name") ($FileName . ".backup");
|
||||||
} do={
|
} on-error={
|
||||||
$LogPrint error $ScriptName ("Uploading backup file failed: " . $Err);
|
$LogPrint error $ScriptName ("Uploading backup file failed!");
|
||||||
:set BackupFile "failed";
|
:set BackupFile "failed";
|
||||||
:set Failed 1;
|
:set Failed 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$RmFile ($FilePath . ".backup");
|
/file/remove ($FilePath . ".backup");
|
||||||
}
|
}
|
||||||
|
|
||||||
# create configuration export
|
# create configuration export
|
||||||
|
|
@ -109,18 +107,18 @@
|
||||||
/export terse show-sensitive file=$FilePath;
|
/export terse show-sensitive file=$FilePath;
|
||||||
$WaitForFile ($FilePath . ".rsc");
|
$WaitForFile ($FilePath . ".rsc");
|
||||||
|
|
||||||
:onerror Err {
|
:do {
|
||||||
/tool/fetch upload=yes url=($BackupUploadUrl . "/" . $FileName . ".rsc") \
|
/tool/fetch upload=yes url=($BackupUploadUrl . "/" . $FileName . ".rsc") \
|
||||||
user=$BackupUploadUser password=$BackupUploadPass src-path=($FilePath . ".rsc");
|
user=$BackupUploadUser password=$BackupUploadPass src-path=($FilePath . ".rsc");
|
||||||
:set ExportFile [ /file/get ($FilePath . ".rsc") ];
|
:set ExportFile [ /file/get ($FilePath . ".rsc") ];
|
||||||
:set ($ExportFile->"name") ($FileName . ".rsc");
|
:set ($ExportFile->"name") ($FileName . ".rsc");
|
||||||
} do={
|
} on-error={
|
||||||
$LogPrint error $ScriptName ("Uploading configuration export failed: " . $Err);
|
$LogPrint error $ScriptName ("Uploading configuration export failed!");
|
||||||
:set ExportFile "failed";
|
:set ExportFile "failed";
|
||||||
:set Failed 1;
|
:set Failed 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$RmFile ($FilePath . ".rsc");
|
/file/remove ($FilePath . ".rsc");
|
||||||
}
|
}
|
||||||
|
|
||||||
# global-config-overlay
|
# global-config-overlay
|
||||||
|
|
@ -130,18 +128,18 @@
|
||||||
file=($FilePath . ".conf\00");
|
file=($FilePath . ".conf\00");
|
||||||
$WaitForFile ($FilePath . ".conf");
|
$WaitForFile ($FilePath . ".conf");
|
||||||
|
|
||||||
:onerror Err {
|
:do {
|
||||||
/tool/fetch upload=yes url=($BackupUploadUrl . "/" . $FileName . ".conf") \
|
/tool/fetch upload=yes url=($BackupUploadUrl . "/" . $FileName . ".conf") \
|
||||||
user=$BackupUploadUser password=$BackupUploadPass src-path=($FilePath . ".conf");
|
user=$BackupUploadUser password=$BackupUploadPass src-path=($FilePath . ".conf");
|
||||||
:set ConfigFile [ /file/get ($FilePath . ".conf") ];
|
:set ConfigFile [ /file/get ($FilePath . ".conf") ];
|
||||||
:set ($ConfigFile->"name") ($FileName . ".conf");
|
:set ($ConfigFile->"name") ($FileName . ".conf");
|
||||||
} do={
|
} on-error={
|
||||||
$LogPrint error $ScriptName ("Uploading global-config-overlay failed: " . $Err);
|
$LogPrint error $ScriptName ("Uploading global-config-overlay failed!");
|
||||||
:set ConfigFile "failed";
|
:set ConfigFile "failed";
|
||||||
:set Failed 1;
|
:set Failed 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$RmFile ($FilePath . ".conf");
|
/file/remove ($FilePath . ".conf");
|
||||||
}
|
}
|
||||||
|
|
||||||
:local FileInfo do={
|
:local FileInfo do={
|
||||||
|
|
@ -172,7 +170,7 @@
|
||||||
:if ($Failed = 1) do={
|
:if ($Failed = 1) do={
|
||||||
:set PackagesUpdateBackupFailure true;
|
:set PackagesUpdateBackupFailure true;
|
||||||
}
|
}
|
||||||
$RmDir $DirName;
|
/file/remove $DirName;
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,27 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: capsman-download-packages.capsman
|
# RouterOS script: capsman-download-packages.capsman
|
||||||
# Copyright (c) 2018-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
||||||
# Michael Gisbers <michael@gisbers.de>
|
# Michael Gisbers <michael@gisbers.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.17
|
# 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://rsc.eworm.de/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;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global CleanFilePath;
|
:global CleanFilePath;
|
||||||
:global DownloadPackage;
|
:global DownloadPackage;
|
||||||
:global FileGet;
|
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
:global MkDir;
|
:global MkDir;
|
||||||
:global RmFile;
|
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
:global WaitFullyConnected;
|
:global WaitFullyConnected;
|
||||||
|
|
||||||
|
|
@ -43,7 +41,7 @@
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ $FileGet $PackagePath ] = false) do={
|
:if ([ :len [ /file/find where name=$PackagePath type="directory" ] ] = 0) do={
|
||||||
: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!");
|
||||||
|
|
@ -54,7 +52,7 @@
|
||||||
"). Please place your packages!");
|
"). Please place your packages!");
|
||||||
}
|
}
|
||||||
|
|
||||||
:foreach Package in=[ /file/find where type="package" \
|
:foreach Package in=[ /file/find where type=package \
|
||||||
package-version!=$InstalledVersion name~("^" . $PackagePath) ] do={
|
package-version!=$InstalledVersion name~("^" . $PackagePath) ] do={
|
||||||
:local File [ /file/get $Package ];
|
:local File [ /file/get $Package ];
|
||||||
:if ($File->"package-architecture" = "mips") do={
|
:if ($File->"package-architecture" = "mips") do={
|
||||||
|
|
@ -63,11 +61,11 @@
|
||||||
: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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ :len [ /file/find where type="package" name~("^" . $PackagePath) ] ] = 0) do={
|
:if ([ :len [ /file/find where type=package name~("^" . $PackagePath) ] ] = 0) do={
|
||||||
$LogPrint info $ScriptName ("No packages available, downloading default set.");
|
$LogPrint info $ScriptName ("No packages available, downloading default set.");
|
||||||
:foreach Arch in={ "arm"; "mipsbe" } do={
|
:foreach Arch in={ "arm"; "mipsbe" } do={
|
||||||
:foreach Package in={ "routeros"; "wireless" } do={
|
:foreach Package in={ "routeros"; "wireless" } do={
|
||||||
|
|
@ -88,6 +86,6 @@
|
||||||
/caps-man/remote-cap/upgrade [ find where version!=$InstalledVersion ];
|
/caps-man/remote-cap/upgrade [ find where version!=$InstalledVersion ];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: capsman-download-packages%TEMPL%
|
# RouterOS script: capsman-download-packages%TEMPL%
|
||||||
# Copyright (c) 2018-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
||||||
# Michael Gisbers <michael@gisbers.de>
|
# Michael Gisbers <michael@gisbers.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.17
|
# 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://rsc.eworm.de/doc/capsman-download-packages.md
|
||||||
|
|
@ -12,19 +12,17 @@
|
||||||
# !! 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.
|
||||||
|
|
||||||
|
:global GlobalFunctionsReady;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global CleanFilePath;
|
:global CleanFilePath;
|
||||||
:global DownloadPackage;
|
:global DownloadPackage;
|
||||||
:global FileGet;
|
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
:global MkDir;
|
:global MkDir;
|
||||||
:global RmFile;
|
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
:global WaitFullyConnected;
|
:global WaitFullyConnected;
|
||||||
|
|
||||||
|
|
@ -45,7 +43,7 @@
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ $FileGet $PackagePath ] = false) do={
|
:if ([ :len [ /file/find where name=$PackagePath type="directory" ] ] = 0) do={
|
||||||
: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!");
|
||||||
|
|
@ -56,7 +54,7 @@
|
||||||
"). Please place your packages!");
|
"). Please place your packages!");
|
||||||
}
|
}
|
||||||
|
|
||||||
:foreach Package in=[ /file/find where type="package" \
|
:foreach Package in=[ /file/find where type=package \
|
||||||
package-version!=$InstalledVersion name~("^" . $PackagePath) ] do={
|
package-version!=$InstalledVersion name~("^" . $PackagePath) ] do={
|
||||||
:local File [ /file/get $Package ];
|
:local File [ /file/get $Package ];
|
||||||
:if ($File->"package-architecture" = "mips") do={
|
:if ($File->"package-architecture" = "mips") do={
|
||||||
|
|
@ -65,11 +63,11 @@
|
||||||
: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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ :len [ /file/find where type="package" name~("^" . $PackagePath) ] ] = 0) do={
|
:if ([ :len [ /file/find where type=package name~("^" . $PackagePath) ] ] = 0) do={
|
||||||
$LogPrint info $ScriptName ("No packages available, downloading default set.");
|
$LogPrint info $ScriptName ("No packages available, downloading default set.");
|
||||||
# NOT /interface/wifi/ #
|
# NOT /interface/wifi/ #
|
||||||
:foreach Arch in={ "arm"; "mipsbe" } do={
|
:foreach Arch in={ "arm"; "mipsbe" } do={
|
||||||
|
|
@ -99,6 +97,6 @@
|
||||||
/interface/wifi/capsman/remote-cap/upgrade [ find where version!=$InstalledVersion ];
|
/interface/wifi/capsman/remote-cap/upgrade [ find where version!=$InstalledVersion ];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,27 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: capsman-download-packages.wifi
|
# RouterOS script: capsman-download-packages.wifi
|
||||||
# Copyright (c) 2018-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
||||||
# Michael Gisbers <michael@gisbers.de>
|
# Michael Gisbers <michael@gisbers.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.17
|
# 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://rsc.eworm.de/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;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global CleanFilePath;
|
:global CleanFilePath;
|
||||||
:global DownloadPackage;
|
:global DownloadPackage;
|
||||||
:global FileGet;
|
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
:global MkDir;
|
:global MkDir;
|
||||||
:global RmFile;
|
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
:global WaitFullyConnected;
|
:global WaitFullyConnected;
|
||||||
|
|
||||||
|
|
@ -43,7 +41,7 @@
|
||||||
:error false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ $FileGet $PackagePath ] = false) do={
|
:if ([ :len [ /file/find where name=$PackagePath type="directory" ] ] = 0) do={
|
||||||
: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!");
|
||||||
|
|
@ -54,7 +52,7 @@
|
||||||
"). Please place your packages!");
|
"). Please place your packages!");
|
||||||
}
|
}
|
||||||
|
|
||||||
:foreach Package in=[ /file/find where type="package" \
|
:foreach Package in=[ /file/find where type=package \
|
||||||
package-version!=$InstalledVersion name~("^" . $PackagePath) ] do={
|
package-version!=$InstalledVersion name~("^" . $PackagePath) ] do={
|
||||||
:local File [ /file/get $Package ];
|
:local File [ /file/get $Package ];
|
||||||
:if ($File->"package-architecture" = "mips") do={
|
:if ($File->"package-architecture" = "mips") do={
|
||||||
|
|
@ -63,11 +61,11 @@
|
||||||
: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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ :len [ /file/find where type="package" name~("^" . $PackagePath) ] ] = 0) do={
|
:if ([ :len [ /file/find where type=package name~("^" . $PackagePath) ] ] = 0) do={
|
||||||
$LogPrint info $ScriptName ("No packages available, downloading default set.");
|
$LogPrint info $ScriptName ("No packages available, downloading default set.");
|
||||||
:foreach Arch in={ "arm"; "arm64" } do={
|
:foreach Arch in={ "arm"; "arm64" } do={
|
||||||
:local Packages { "arm"={ "routeros"; "wifi-qcom"; "wifi-qcom-ac" };
|
:local Packages { "arm"={ "routeros"; "wifi-qcom"; "wifi-qcom-ac" };
|
||||||
|
|
@ -90,6 +88,6 @@
|
||||||
/interface/wifi/capsman/remote-cap/upgrade [ find where version!=$InstalledVersion ];
|
/interface/wifi/capsman/remote-cap/upgrade [ find where version!=$InstalledVersion ];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,22 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: capsman-rolling-upgrade.capsman
|
# RouterOS script: capsman-rolling-upgrade.capsman
|
||||||
# Copyright (c) 2018-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
||||||
# Michael Gisbers <michael@gisbers.de>
|
# Michael Gisbers <michael@gisbers.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: capsman-rolling-upgrade.capsman
|
# provides: capsman-rolling-upgrade.capsman
|
||||||
# requires RouterOS, version=7.17
|
# 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://rsc.eworm.de/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;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
|
|
@ -45,6 +45,6 @@
|
||||||
:delay ($Delay . "s");
|
:delay ($Delay . "s");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: capsman-rolling-upgrade%TEMPL%
|
# RouterOS script: capsman-rolling-upgrade%TEMPL%
|
||||||
# Copyright (c) 2018-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
||||||
# Michael Gisbers <michael@gisbers.de>
|
# Michael Gisbers <michael@gisbers.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: capsman-rolling-upgrade%TEMPL%
|
# provides: capsman-rolling-upgrade%TEMPL%
|
||||||
# requires RouterOS, version=7.17
|
# 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://rsc.eworm.de/doc/capsman-rolling-upgrade.md
|
||||||
|
|
@ -13,11 +13,11 @@
|
||||||
# !! 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.
|
||||||
|
|
||||||
|
:global GlobalFunctionsReady;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
|
|
@ -53,6 +53,6 @@
|
||||||
:delay ($Delay . "s");
|
:delay ($Delay . "s");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,22 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: capsman-rolling-upgrade.wifi
|
# RouterOS script: capsman-rolling-upgrade.wifi
|
||||||
# Copyright (c) 2018-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
||||||
# Michael Gisbers <michael@gisbers.de>
|
# Michael Gisbers <michael@gisbers.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: capsman-rolling-upgrade.wifi
|
# provides: capsman-rolling-upgrade.wifi
|
||||||
# requires RouterOS, version=7.17
|
# 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://rsc.eworm.de/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;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
|
|
@ -46,6 +46,6 @@
|
||||||
:delay ($Delay . "s");
|
:delay ($Delay . "s");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: certificate-renew-issued
|
# RouterOS script: certificate-renew-issued
|
||||||
# Copyright (c) 2019-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2019-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.17
|
# requires RouterOS, version=7.14
|
||||||
#
|
#
|
||||||
# renew locally issued certificates
|
# renew locally issued certificates
|
||||||
# https://rsc.eworm.de/doc/certificate-renew-issued.md
|
# https://rsc.eworm.de/doc/certificate-renew-issued.md
|
||||||
|
|
||||||
|
:global GlobalFunctionsReady;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global CertIssuedExportPass;
|
:global CertIssuedExportPass;
|
||||||
|
|
@ -47,6 +47,6 @@
|
||||||
$LogPrint info $ScriptName ("Issued a new certificate for '" . $CertVal->"common-name" . "'.");
|
$LogPrint info $ScriptName ("Issued a new certificate for '" . $CertVal->"common-name" . "'.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
28
certs/GlobalSign.pem
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
# Issuer: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R3
|
||||||
|
# Subject: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R3
|
||||||
|
# Label: "GlobalSign Root CA - R3"
|
||||||
|
# Serial: 4835703278459759426209954
|
||||||
|
# MD5 Fingerprint: c5:df:b8:49:ca:05:13:55:ee:2d:ba:1a:c3:3e:b0:28
|
||||||
|
# SHA1 Fingerprint: d6:9b:56:11:48:f0:1c:77:c5:45:78:c1:09:26:df:5b:85:69:76:ad
|
||||||
|
# SHA256 Fingerprint: cb:b5:22:d7:b7:f1:27:ad:6a:01:13:86:5b:df:1c:d4:10:2e:7d:07:59:af:63:5a:7c:f4:72:0d:c9:63:c5:3b
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4G
|
||||||
|
A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNp
|
||||||
|
Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4
|
||||||
|
MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEG
|
||||||
|
A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI
|
||||||
|
hvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWtiHL8
|
||||||
|
RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsT
|
||||||
|
gHeMCOFJ0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmm
|
||||||
|
KPZpO/bLyCiR5Z2KYVc3rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zd
|
||||||
|
QQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjlOCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZ
|
||||||
|
XriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2xmmFghcCAwEAAaNCMEAw
|
||||||
|
DgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI/wS3+o
|
||||||
|
LkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZU
|
||||||
|
RUm7lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMp
|
||||||
|
jjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK
|
||||||
|
6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX
|
||||||
|
mcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs
|
||||||
|
Mx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH
|
||||||
|
WD9f
|
||||||
|
-----END CERTIFICATE-----
|
||||||
|
|
@ -15,7 +15,7 @@ DOMAINS_DUAL = \
|
||||||
git.eworm.de/ISRG-Root-X2 \
|
git.eworm.de/ISRG-Root-X2 \
|
||||||
lists.blocklist.de/Certum-Trusted-Network-CA \
|
lists.blocklist.de/Certum-Trusted-Network-CA \
|
||||||
matrix.org/GTS-Root-R4 \
|
matrix.org/GTS-Root-R4 \
|
||||||
raw.githubusercontent.com/USERTrust-RSA-Certification-Authority \
|
raw.githubusercontent.com/DigiCert-Global-Root-G2 \
|
||||||
rsc.eworm.de/ISRG-Root-X2 \
|
rsc.eworm.de/ISRG-Root-X2 \
|
||||||
upgrade.mikrotik.com/ISRG-Root-X1
|
upgrade.mikrotik.com/ISRG-Root-X1
|
||||||
DOMAINS_IPV4 = \
|
DOMAINS_IPV4 = \
|
||||||
|
|
@ -23,10 +23,12 @@ DOMAINS_IPV4 = \
|
||||||
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.mullvad.net/ISRG-Root-X1 \
|
api.mullvad.net/ISRG-Root-X1 \
|
||||||
|
feodotracker.abuse.ch/GlobalSign \
|
||||||
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 \
|
||||||
mkcert.org/ISRG-Root-X1 \
|
mkcert.org/ISRG-Root-X1 \
|
||||||
ntfy.sh/ISRG-Root-X1 \
|
ntfy.sh/ISRG-Root-X1 \
|
||||||
|
sslbl.abuse.ch/GlobalSign \
|
||||||
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 = \
|
DOMAINS_IPV6 = \
|
||||||
|
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
# Issuer: CN=USERTrust RSA Certification Authority O=The USERTRUST Network
|
|
||||||
# Subject: CN=USERTrust RSA Certification Authority O=The USERTRUST Network
|
|
||||||
# Label: "USERTrust RSA Certification Authority"
|
|
||||||
# Serial: 2645093764781058787591871645665788717
|
|
||||||
# MD5 Fingerprint: 1b:fe:69:d1:91:b7:19:33:a3:72:a8:0f:e1:55:e5:b5
|
|
||||||
# SHA1 Fingerprint: 2b:8f:1b:57:33:0d:bb:a2:d0:7a:6c:51:f7:0e:e9:0d:da:b9:ad:8e
|
|
||||||
# SHA256 Fingerprint: e7:93:c9:b0:2f:d8:aa:13:e2:1c:31:22:8a:cc:b0:81:19:64:3b:74:9c:89:89:64:b1:74:6d:46:c3:d4:cb:d2
|
|
||||||
-----BEGIN CERTIFICATE-----
|
|
||||||
MIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCB
|
|
||||||
iDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0pl
|
|
||||||
cnNleSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNV
|
|
||||||
BAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTAw
|
|
||||||
MjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UEBhMCVVMxEzARBgNV
|
|
||||||
BAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU
|
|
||||||
aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2Vy
|
|
||||||
dGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIK
|
|
||||||
AoICAQCAEmUXNg7D2wiz0KxXDXbtzSfTTK1Qg2HiqiBNCS1kCdzOiZ/MPans9s/B
|
|
||||||
3PHTsdZ7NygRK0faOca8Ohm0X6a9fZ2jY0K2dvKpOyuR+OJv0OwWIJAJPuLodMkY
|
|
||||||
tJHUYmTbf6MG8YgYapAiPLz+E/CHFHv25B+O1ORRxhFnRghRy4YUVD+8M/5+bJz/
|
|
||||||
Fp0YvVGONaanZshyZ9shZrHUm3gDwFA66Mzw3LyeTP6vBZY1H1dat//O+T23LLb2
|
|
||||||
VN3I5xI6Ta5MirdcmrS3ID3KfyI0rn47aGYBROcBTkZTmzNg95S+UzeQc0PzMsNT
|
|
||||||
79uq/nROacdrjGCT3sTHDN/hMq7MkztReJVni+49Vv4M0GkPGw/zJSZrM233bkf6
|
|
||||||
c0Plfg6lZrEpfDKEY1WJxA3Bk1QwGROs0303p+tdOmw1XNtB1xLaqUkL39iAigmT
|
|
||||||
Yo61Zs8liM2EuLE/pDkP2QKe6xJMlXzzawWpXhaDzLhn4ugTncxbgtNMs+1b/97l
|
|
||||||
c6wjOy0AvzVVdAlJ2ElYGn+SNuZRkg7zJn0cTRe8yexDJtC/QV9AqURE9JnnV4ee
|
|
||||||
UB9XVKg+/XRjL7FQZQnmWEIuQxpMtPAlR1n6BB6T1CZGSlCBst6+eLf8ZxXhyVeE
|
|
||||||
Hg9j1uliutZfVS7qXMYoCAQlObgOK6nyTJccBz8NUvXt7y+CDwIDAQABo0IwQDAd
|
|
||||||
BgNVHQ4EFgQUU3m/WqorSs9UgOHYm8Cd8rIDZsswDgYDVR0PAQH/BAQDAgEGMA8G
|
|
||||||
A1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAFzUfA3P9wF9QZllDHPF
|
|
||||||
Up/L+M+ZBn8b2kMVn54CVVeWFPFSPCeHlCjtHzoBN6J2/FNQwISbxmtOuowhT6KO
|
|
||||||
VWKR82kV2LyI48SqC/3vqOlLVSoGIG1VeCkZ7l8wXEskEVX/JJpuXior7gtNn3/3
|
|
||||||
ATiUFJVDBwn7YKnuHKsSjKCaXqeYalltiz8I+8jRRa8YFWSQEg9zKC7F4iRO/Fjs
|
|
||||||
8PRF/iKz6y+O0tlFYQXBl2+odnKPi4w2r78NBc5xjeambx9spnFixdjQg3IM8WcR
|
|
||||||
iQycE0xyNN+81XHfqnHd4blsjDwSXWXavVcStkNr/+XeTWYRUc+ZruwXtuhxkYze
|
|
||||||
Sf7dNXGiFSeUHM9h4ya7b6NnJSFd5t0dCy5oGzuCr+yDZ4XUmFF0sbmZgIn/f3gZ
|
|
||||||
XHlKYC6SQK5MNyosycdiyA5d9zZbyuAlJQG03RoHnHcAP9Dc1ew91Pq7P8yF1m9/
|
|
||||||
qS3fuQL39ZeatTXaw2ewh0qpKJ4jjv9cJ2vhsE/zB+4ALtRZh8tSQZXq9EfX7mRB
|
|
||||||
VXyNWQKV3WKdwrnuWih0hKWbt5DHDAff9Yk2dDLWKMGwsAvgnEzDHNb842m1R0aB
|
|
||||||
L6KCq9NjRHDEjf8tM7qtj3u1cIiuPhnPQCjY/MiQu12ZIvVS5ljFH4gxQ+6IHdfG
|
|
||||||
jjxDah2nGN59PRbxYvnKkKj9
|
|
||||||
-----END CERTIFICATE-----
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: check-certificates
|
# RouterOS script: check-certificates
|
||||||
# Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.17
|
# requires RouterOS, version=7.14
|
||||||
# requires device-mode, fetch
|
# requires device-mode, fetch
|
||||||
#
|
#
|
||||||
# check for certificate validity
|
# check for certificate validity
|
||||||
# https://rsc.eworm.de/doc/check-certificates.md
|
# https://rsc.eworm.de/doc/check-certificates.md
|
||||||
|
|
||||||
|
:global GlobalFunctionsReady;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global CertRenewTime;
|
:global CertRenewTime;
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
:global CertWarnTime;
|
:global CertWarnTime;
|
||||||
:global Identity;
|
:global Identity;
|
||||||
|
|
||||||
:global CertificateAvailable;
|
:global CertificateAvailable
|
||||||
:global EscapeForRegEx;
|
:global EscapeForRegEx;
|
||||||
:global IfThenElse;
|
:global IfThenElse;
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
|
|
@ -44,32 +44,26 @@
|
||||||
: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 $FetchName ] . $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 . "'.");
|
||||||
|
|
@ -82,13 +76,13 @@
|
||||||
$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={
|
||||||
|
|
@ -106,6 +100,7 @@
|
||||||
:local FormatCertChain do={
|
:local FormatCertChain do={
|
||||||
:local Cert $1;
|
:local Cert $1;
|
||||||
|
|
||||||
|
:global EitherOr;
|
||||||
:global ParseKeyValueStore;
|
:global ParseKeyValueStore;
|
||||||
|
|
||||||
:local CertVal [ /certificate/get $Cert ];
|
:local CertVal [ /certificate/get $Cert ];
|
||||||
|
|
@ -116,18 +111,9 @@
|
||||||
|
|
||||||
:local Return "";
|
:local Return "";
|
||||||
:for I from=0 to=5 do={
|
:for I from=0 to=5 do={
|
||||||
:set Return ($Return . [ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN");
|
:set Return ($Return . [ $EitherOr ([ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN") \
|
||||||
:local CertSettings [ /certificate/settings/get ];
|
([ $ParseKeyValueStore (($CertVal->"issuer")->0) ]->"CN") ]);
|
||||||
:if (([ :len ($CertSettings->"builtin-trust-anchors") ] > 0 || \
|
:set CertVal [ /certificate/get [ find where skid=($CertVal->"akid") ] ];
|
||||||
[ :len ($CertSettings->"builtin-trust-store") ] > 0) && \
|
|
||||||
[[ :parse (":return [ :len [ /certificate/builtin/find where skid=\"" . ($CertVal->"akid") . "\" ] ]") ]] > 0) do={
|
|
||||||
:return $Return;
|
|
||||||
}
|
|
||||||
:do {
|
|
||||||
:set CertVal [ /certificate/get [ find where skid=($CertVal->"akid") ] ];
|
|
||||||
} on-error={
|
|
||||||
:return ($Return . " (possibly incomplete!)");
|
|
||||||
}
|
|
||||||
:if (($CertVal->"akid") = "" || ($CertVal->"akid") = ($CertVal->"skid")) do={
|
:if (($CertVal->"akid") = "" || ($CertVal->"akid") = ($CertVal->"skid")) do={
|
||||||
:return $Return;
|
:return $Return;
|
||||||
}
|
}
|
||||||
|
|
@ -197,7 +183,7 @@
|
||||||
fingerprint!=[ :tostr ($CertVal->"fingerprint") ] expires-after>$CertRenewTime ];
|
fingerprint!=[ :tostr ($CertVal->"fingerprint") ] expires-after>$CertRenewTime ];
|
||||||
:local CertNewVal [ /certificate/get $CertNew ];
|
:local CertNewVal [ /certificate/get $CertNew ];
|
||||||
|
|
||||||
:if ([ $CertificateAvailable ([ $ParseKeyValueStore ($CertNewVal->"issuer") ]->"CN") "fetch" ] = false) do={
|
:if ([ $CertificateAvailable ([ $ParseKeyValueStore ($CertNewVal->"issuer") ]->"CN") ] = false) do={
|
||||||
$LogPrint warning $ScriptName ("The certificate chain is not available!");
|
$LogPrint warning $ScriptName ("The certificate chain is not available!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -239,12 +225,12 @@
|
||||||
:local State [ $IfThenElse (($CertVal->"expired") = true) "expired" "is about to expire" ];
|
:local State [ $IfThenElse (($CertVal->"expired") = true) "expired" "is about to expire" ];
|
||||||
|
|
||||||
$SendNotification2 ({ origin=$ScriptName; \
|
$SendNotification2 ({ origin=$ScriptName; \
|
||||||
subject=([ $SymbolForNotification "lock-with-ink-pen,warning-sign" ] . "Certificate warning: " . ($CertVal->"name")); \
|
subject=([ $SymbolForNotification "warning-sign" ] . "Certificate warning: " . ($CertVal->"name")); \
|
||||||
message=("A certificate on " . $Identity . " " . $State . ".\n\n" . [ $FormatInfo $Cert ]) });
|
message=("A certificate on " . $Identity . " " . $State . ".\n\n" . [ $FormatInfo $Cert ]) });
|
||||||
$LogPrint info $ScriptName ("The certificate '" . ($CertVal->"name") . "' " . $State . \
|
$LogPrint info $ScriptName ("The certificate '" . ($CertVal->"name") . "' " . $State . \
|
||||||
", it is invalid after " . ($CertVal->"invalid-after") . ".");
|
", it is invalid after " . ($CertVal->"invalid-after") . ".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: check-health.d/state
|
# RouterOS script: check-health.d/state
|
||||||
# Copyright (c) 2019-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2019-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.17
|
# requires RouterOS, version=7.14
|
||||||
#
|
#
|
||||||
# check for RouterOS health state - state plugin
|
# check for RouterOS health state - state plugin
|
||||||
# https://rsc.eworm.de/doc/check-health.md
|
# https://rsc.eworm.de/doc/check-health.md
|
||||||
|
|
@ -11,8 +11,7 @@
|
||||||
:global CheckHealthPlugins;
|
:global CheckHealthPlugins;
|
||||||
|
|
||||||
:set ($CheckHealthPlugins->[ :jobname ]) do={
|
:set ($CheckHealthPlugins->[ :jobname ]) do={
|
||||||
:local FuncName [ :tostr $0 ];
|
:local FuncName [ :tostr $0 ];
|
||||||
:local ScriptName [ :tostr $1 ];
|
|
||||||
|
|
||||||
:global CheckHealthLast;
|
:global CheckHealthLast;
|
||||||
:global Identity;
|
:global Identity;
|
||||||
|
|
@ -33,13 +32,13 @@
|
||||||
:if ([ :typeof ($CheckHealthLast->$Name) ] != "nothing") do={
|
:if ([ :typeof ($CheckHealthLast->$Name) ] != "nothing") do={
|
||||||
:if ($CheckHealthLast->$Name = "ok" && \
|
:if ($CheckHealthLast->$Name = "ok" && \
|
||||||
$Value != "ok") do={
|
$Value != "ok") do={
|
||||||
$SendNotification2 ({ origin=$ScriptName; \
|
$SendNotification2 ({ origin=$FuncName; \
|
||||||
subject=([ $SymbolForNotification "cross-mark" ] . "Health warning: " . $Name); \
|
subject=([ $SymbolForNotification "cross-mark" ] . "Health warning: " . $Name); \
|
||||||
message=("The device '" . $Name . "' on " . $Identity . " failed!") });
|
message=("The device '" . $Name . "' on " . $Identity . " failed!") });
|
||||||
}
|
}
|
||||||
:if ($CheckHealthLast->$Name != "ok" && \
|
:if ($CheckHealthLast->$Name != "ok" && \
|
||||||
$Value = "ok") do={
|
$Value = "ok") do={
|
||||||
$SendNotification2 ({ origin=$ScriptName; \
|
$SendNotification2 ({ origin=$FuncName; \
|
||||||
subject=([ $SymbolForNotification "white-heavy-check-mark" ] . "Health recovery: " . $Name); \
|
subject=([ $SymbolForNotification "white-heavy-check-mark" ] . "Health recovery: " . $Name); \
|
||||||
message=("The device '" . $Name . "' on " . $Identity . " recovered!") });
|
message=("The device '" . $Name . "' on " . $Identity . " recovered!") });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: check-health.d/temperature
|
# RouterOS script: check-health.d/temperature
|
||||||
# Copyright (c) 2019-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2019-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.17
|
# requires RouterOS, version=7.14
|
||||||
#
|
#
|
||||||
# check for RouterOS health state - temperature plugin
|
# check for RouterOS health state - temperature plugin
|
||||||
# https://rsc.eworm.de/doc/check-health.md
|
# https://rsc.eworm.de/doc/check-health.md
|
||||||
|
|
@ -11,8 +11,7 @@
|
||||||
:global CheckHealthPlugins;
|
:global CheckHealthPlugins;
|
||||||
|
|
||||||
:set ($CheckHealthPlugins->[ :jobname ]) do={
|
:set ($CheckHealthPlugins->[ :jobname ]) do={
|
||||||
:local FuncName [ :tostr $0 ];
|
:local FuncName [ :tostr $0 ];
|
||||||
:local ScriptName [ :tostr $1 ];
|
|
||||||
|
|
||||||
:global CheckHealthLast;
|
:global CheckHealthLast;
|
||||||
:global CheckHealthTemperature;
|
:global CheckHealthTemperature;
|
||||||
|
|
@ -55,7 +54,7 @@
|
||||||
}
|
}
|
||||||
:if ($Value > $CheckHealthTemperature->$Name && \
|
:if ($Value > $CheckHealthTemperature->$Name && \
|
||||||
$CheckHealthTemperatureNotified->$Name != true) do={
|
$CheckHealthTemperatureNotified->$Name != true) do={
|
||||||
$SendNotification2 ({ origin=$ScriptName; \
|
$SendNotification2 ({ origin=$FuncName; \
|
||||||
subject=([ $SymbolForNotification "fire" ] . "Health warning: " . $Name); \
|
subject=([ $SymbolForNotification "fire" ] . "Health warning: " . $Name); \
|
||||||
message=("The " . $Name . " on " . $Identity . " is above threshold: " . \
|
message=("The " . $Name . " on " . $Identity . " is above threshold: " . \
|
||||||
$Value . "\C2\B0" . "C") });
|
$Value . "\C2\B0" . "C") });
|
||||||
|
|
@ -63,7 +62,7 @@
|
||||||
}
|
}
|
||||||
:if ($Value <= ($CheckHealthTemperature->$Name - $CheckHealthTemperatureDeviation) && \
|
:if ($Value <= ($CheckHealthTemperature->$Name - $CheckHealthTemperatureDeviation) && \
|
||||||
$CheckHealthTemperatureNotified->$Name = true) do={
|
$CheckHealthTemperatureNotified->$Name = true) do={
|
||||||
$SendNotification2 ({ origin=$ScriptName; \
|
$SendNotification2 ({ origin=$FuncName; \
|
||||||
subject=([ $SymbolForNotification "white-heavy-check-mark" ] . "Health recovery: " . $Name); \
|
subject=([ $SymbolForNotification "white-heavy-check-mark" ] . "Health recovery: " . $Name); \
|
||||||
message=("The " . $Name . " on " . $Identity . " dropped below threshold: " . \
|
message=("The " . $Name . " on " . $Identity . " dropped below threshold: " . \
|
||||||
$Value . "\C2\B0" . "C") });
|
$Value . "\C2\B0" . "C") });
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: check-health.d/voltage
|
# RouterOS script: check-health.d/voltage
|
||||||
# Copyright (c) 2019-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2019-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.17
|
# requires RouterOS, version=7.14
|
||||||
#
|
#
|
||||||
# check for RouterOS health state - voltage plugin
|
# check for RouterOS health state - voltage plugin
|
||||||
# https://rsc.eworm.de/doc/check-health.md
|
# https://rsc.eworm.de/doc/check-health.md
|
||||||
|
|
@ -11,8 +11,7 @@
|
||||||
:global CheckHealthPlugins;
|
:global CheckHealthPlugins;
|
||||||
|
|
||||||
:set ($CheckHealthPlugins->[ :jobname ]) do={
|
:set ($CheckHealthPlugins->[ :jobname ]) do={
|
||||||
:local FuncName [ :tostr $0 ];
|
:local FuncName [ :tostr $0 ];
|
||||||
:local ScriptName [ :tostr $1 ];
|
|
||||||
|
|
||||||
:global CheckHealthLast;
|
:global CheckHealthLast;
|
||||||
:global CheckHealthVoltageLow;
|
:global CheckHealthVoltageLow;
|
||||||
|
|
@ -40,7 +39,7 @@
|
||||||
|
|
||||||
:if ($NumLast * (100 + $CheckHealthVoltagePercent) < $NumCurr * 100 || \
|
:if ($NumLast * (100 + $CheckHealthVoltagePercent) < $NumCurr * 100 || \
|
||||||
$NumLast * 100 > $NumCurr * (100 + $CheckHealthVoltagePercent)) do={
|
$NumLast * 100 > $NumCurr * (100 + $CheckHealthVoltagePercent)) do={
|
||||||
$SendNotification2 ({ origin=$ScriptName; \
|
$SendNotification2 ({ origin=$FuncName; \
|
||||||
subject=([ $SymbolForNotification ("high-voltage-sign,chart-" . [ $IfThenElse ($NumLast < \
|
subject=([ $SymbolForNotification ("high-voltage-sign,chart-" . [ $IfThenElse ($NumLast < \
|
||||||
$NumCurr) "in" "de" ] . "creasing") ] . "Health warning: " . $Name); \
|
$NumCurr) "in" "de" ] . "creasing") ] . "Health warning: " . $Name); \
|
||||||
message=("The " . $Name . " on " . $Identity . " jumped more than " . $CheckHealthVoltagePercent . "%.\n\n" . \
|
message=("The " . $Name . " on " . $Identity . " jumped more than " . $CheckHealthVoltagePercent . "%.\n\n" . \
|
||||||
|
|
@ -48,12 +47,12 @@
|
||||||
[ $FormatLine "new value" ($Value . " V") 12 ]) });
|
[ $FormatLine "new value" ($Value . " V") 12 ]) });
|
||||||
} else={
|
} else={
|
||||||
:if ($NumCurr <= $CheckHealthVoltageLow && $NumLast > $CheckHealthVoltageLow) do={
|
:if ($NumCurr <= $CheckHealthVoltageLow && $NumLast > $CheckHealthVoltageLow) do={
|
||||||
$SendNotification2 ({ origin=$ScriptName; \
|
$SendNotification2 ({ origin=$FuncName; \
|
||||||
subject=([ $SymbolForNotification "high-voltage-sign,chart-decreasing" ] . "Health warning: Low " . $Name); \
|
subject=([ $SymbolForNotification "high-voltage-sign,chart-decreasing" ] . "Health warning: Low " . $Name); \
|
||||||
message=("The " . $Name . " on " . $Identity . " dropped to " . $Value . " V below hard limit.") });
|
message=("The " . $Name . " on " . $Identity . " dropped to " . $Value . " V below hard limit.") });
|
||||||
}
|
}
|
||||||
:if ($NumCurr > $CheckHealthVoltageLow && $NumLast <= $CheckHealthVoltageLow) do={
|
:if ($NumCurr > $CheckHealthVoltageLow && $NumLast <= $CheckHealthVoltageLow) do={
|
||||||
$SendNotification2 ({ origin=$ScriptName; \
|
$SendNotification2 ({ origin=$FuncName; \
|
||||||
subject=([ $SymbolForNotification "high-voltage-sign,chart-increasing" ] . "Health recovery: Low " . $Name); \
|
subject=([ $SymbolForNotification "high-voltage-sign,chart-increasing" ] . "Health recovery: Low " . $Name); \
|
||||||
message=("The " . $Name . " on " . $Identity . " recovered to " . $Value . " V above hard limit.") });
|
message=("The " . $Name . " on " . $Identity . " recovered to " . $Value . " V above hard limit.") });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: check-health
|
# RouterOS script: check-health
|
||||||
# Copyright (c) 2019-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2019-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.17
|
# requires RouterOS, version=7.14
|
||||||
#
|
#
|
||||||
# check for RouterOS health state
|
# check for RouterOS health state
|
||||||
# https://rsc.eworm.de/doc/check-health.md
|
# https://rsc.eworm.de/doc/check-health.md
|
||||||
|
|
||||||
|
:global GlobalFunctionsReady;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global CheckHealthCPUUtilization;
|
:global CheckHealthCPUUtilization;
|
||||||
|
|
@ -74,7 +74,7 @@
|
||||||
:set CheckHealthRAMUtilizationNotified false;
|
:set CheckHealthRAMUtilizationNotified false;
|
||||||
}
|
}
|
||||||
|
|
||||||
:local Plugins [ /system/script/find where name~"^check-health\\.d/." ];
|
:local Plugins [ /system/script/find where name~"^check-health.d/." ];
|
||||||
:if ([ :len $Plugins ] = 0) do={
|
:if ([ :len $Plugins ] = 0) do={
|
||||||
$LogPrint debug $ScriptName ("No plugins installed.");
|
$LogPrint debug $ScriptName ("No plugins installed.");
|
||||||
:set ExitOK true;
|
:set ExitOK true;
|
||||||
|
|
@ -89,22 +89,22 @@
|
||||||
:foreach Plugin in=$Plugins do={
|
:foreach Plugin in=$Plugins do={
|
||||||
:local PluginVal [ /system/script/get $Plugin ];
|
:local PluginVal [ /system/script/get $Plugin ];
|
||||||
:if ([ $ValidateSyntax ($PluginVal->"source") ] = true) do={
|
:if ([ $ValidateSyntax ($PluginVal->"source") ] = true) do={
|
||||||
:onerror Err {
|
:do {
|
||||||
/system/script/run $Plugin;
|
/system/script/run $Plugin;
|
||||||
} do={
|
} on-error={
|
||||||
$LogPrint error $ScriptName ("Plugin '" . $PluginVal->"name" . "' failed to run: " . $Err);
|
$LogPrint error $ScriptName ("Plugin '" . $ScriptVal->"name" . "' failed to run.");
|
||||||
}
|
}
|
||||||
} else={
|
} else={
|
||||||
$LogPrint error $ScriptName ("Plugin '" . $PluginVal->"name" . "' failed syntax validation, skipping.");
|
$LogPrint error $ScriptName ("Plugin '" . $ScriptVal->"name" . "' failed syntax validation, skipping.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:foreach PluginName,Discard in=$CheckHealthPlugins do={
|
:foreach PluginName,Discard in=$CheckHealthPlugins do={
|
||||||
($CheckHealthPlugins->$PluginName) \
|
($CheckHealthPlugins->$PluginName) \
|
||||||
("\$CheckHealthPlugins->\"" . $PluginName . "\"") $ScriptName;
|
("\$CheckHealthPlugins->\"" . $PluginName . "\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
:set CheckHealthPlugins;
|
:set CheckHealthPlugins;
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: check-lte-firmware-upgrade
|
# RouterOS script: check-lte-firmware-upgrade
|
||||||
# Copyright (c) 2018-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.17
|
# 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://rsc.eworm.de/doc/check-lte-firmware-upgrade.md
|
||||||
|
|
||||||
|
:global GlobalFunctionsReady;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global SentLteFirmwareUpgradeNotification;
|
:global SentLteFirmwareUpgradeNotification;
|
||||||
|
|
@ -45,12 +45,12 @@
|
||||||
:local IntName [ /interface/lte/get $Interface name ];
|
:local IntName [ /interface/lte/get $Interface name ];
|
||||||
:local Firmware;
|
:local Firmware;
|
||||||
:local Info;
|
:local Info;
|
||||||
:onerror Err {
|
:do {
|
||||||
:set Firmware [ /interface/lte/firmware-upgrade $Interface as-value ];
|
:set Firmware [ /interface/lte/firmware-upgrade $Interface as-value ];
|
||||||
:set Info [ /interface/lte/monitor $Interface once as-value ];
|
:set Info [ /interface/lte/monitor $Interface once as-value ];
|
||||||
} do={
|
} on-error={
|
||||||
$LogPrint debug $ScriptName ("Could not get latest LTE firmware version for interface " . \
|
$LogPrint debug $ScriptName ("Could not get latest LTE firmware version for interface " . \
|
||||||
$IntName . ": " . $Err);
|
$IntName . ".");
|
||||||
:return false;
|
:return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -102,6 +102,6 @@
|
||||||
:foreach Interface in=[ /interface/lte/find ] do={
|
:foreach Interface in=[ /interface/lte/find ] do={
|
||||||
$CheckInterface $ScriptName $Interface;
|
$CheckInterface $ScriptName $Interface;
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
||||||
#!rsc by RouterOS
|
|
||||||
# RouterOS script: check-perpetual-license
|
|
||||||
# Copyright (c) 2025-2026 Christian Hesse <mail@eworm.de>
|
|
||||||
# https://rsc.eworm.de/COPYING.md
|
|
||||||
#
|
|
||||||
# requires RouterOS, version=7.17
|
|
||||||
#
|
|
||||||
# check perpetual license on CHR
|
|
||||||
# https://rsc.eworm.de/doc/check-perpetual-license.md
|
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:onerror Err {
|
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
|
||||||
|
|
||||||
:global Identity;
|
|
||||||
:global SentCertificateNotification;
|
|
||||||
|
|
||||||
:global LogPrint;
|
|
||||||
:global ScriptLock;
|
|
||||||
:global SendNotification2;
|
|
||||||
:global SymbolForNotification;
|
|
||||||
:global WaitFullyConnected;
|
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$WaitFullyConnected;
|
|
||||||
|
|
||||||
:local License [ /system/license/get ];
|
|
||||||
:if ([ :typeof ($License->"deadline-at") ] != "str") do={
|
|
||||||
$LogPrint info $ScriptName ("This device does not have a perpetual license.");
|
|
||||||
:set ExitOK true;
|
|
||||||
:error true;
|
|
||||||
}
|
|
||||||
|
|
||||||
:if ([ :len ($License->"next-renewal-at") ] = 0 && ($License->"limited-upgrades") = true) do={
|
|
||||||
$LogPrint warning $ScriptName ("Your license expired on " . ($License->"deadline-at") . "!");
|
|
||||||
:if ($SentCertificateNotification != "expired") do={
|
|
||||||
$SendNotification2 ({ origin=$ScriptName; \
|
|
||||||
subject=([ $SymbolForNotification "scroll,cross-mark" ] . "License expired!"); \
|
|
||||||
message=("Your license expired on " . ($License->"deadline-at") . \
|
|
||||||
", can no longer update RouterOS on " . $Identity . "...") });
|
|
||||||
:set SentCertificateNotification "expired";
|
|
||||||
}
|
|
||||||
:set ExitOK true;
|
|
||||||
:error true;
|
|
||||||
}
|
|
||||||
|
|
||||||
:if ([ :totime ($License->"deadline-at") ] - 3w < [ :timestamp ]) do={
|
|
||||||
$LogPrint warning $ScriptName ("Your license will expire on " . ($License->"deadline-at") . "!");
|
|
||||||
:if ($SentCertificateNotification != "warning") do={
|
|
||||||
$SendNotification2 ({ origin=$ScriptName; \
|
|
||||||
subject=([ $SymbolForNotification "scroll,warning-sign" ] . "License about to expire!"); \
|
|
||||||
message=("Your license failed to renew and is about to expire on " . \
|
|
||||||
($License->"deadline-at") . " on " . $Identity . "...") });
|
|
||||||
:set SentCertificateNotification "warning";
|
|
||||||
}
|
|
||||||
:set ExitOK true;
|
|
||||||
:error true;
|
|
||||||
}
|
|
||||||
|
|
||||||
:if ([ :typeof $SentCertificateNotification ] = "str" && \
|
|
||||||
[ :totime ($License->"deadline-at") ] - 4w > [ :timestamp ]) do={
|
|
||||||
$LogPrint info $ScriptName ("Your license was successfully renewed.");
|
|
||||||
$SendNotification2 ({ origin=$ScriptName; \
|
|
||||||
subject=([ $SymbolForNotification "scroll,white-heavy-check-mark" ] . "License renewed"); \
|
|
||||||
message=("Your license was successfully renewed on " . $Identity . \
|
|
||||||
". It is now valid until " . ($License->"deadline-at") . ".") });
|
|
||||||
:set SentCertificateNotification;
|
|
||||||
}
|
|
||||||
} do={
|
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
|
||||||
}
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: check-routeros-update
|
# RouterOS script: check-routeros-update
|
||||||
# Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.17
|
# requires RouterOS, version=7.14
|
||||||
# requires device-mode, fetch, scheduler
|
# 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://rsc.eworm.de/doc/check-routeros-update.md
|
||||||
|
|
||||||
|
:global GlobalFunctionsReady;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global Identity;
|
:global Identity;
|
||||||
|
|
@ -28,7 +28,6 @@
|
||||||
:global EscapeForRegEx;
|
:global EscapeForRegEx;
|
||||||
:global FetchUserAgentStr;
|
:global FetchUserAgentStr;
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
:global RebootForUpdate;
|
|
||||||
:global ScriptFromTerminal;
|
:global ScriptFromTerminal;
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
:global SendNotification2;
|
:global SendNotification2;
|
||||||
|
|
@ -39,11 +38,14 @@
|
||||||
:local DoUpdate do={
|
:local DoUpdate do={
|
||||||
:local ScriptName [ :tostr $1 ];
|
: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.");
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
|
|
@ -60,14 +62,8 @@
|
||||||
$WaitFullyConnected;
|
$WaitFullyConnected;
|
||||||
|
|
||||||
:if ([ :len [ /system/scheduler/find where name="_RebootForUpdate" ] ] > 0) do={
|
:if ([ :len [ /system/scheduler/find where name="_RebootForUpdate" ] ] > 0) do={
|
||||||
:if ([ :typeof $RebootForUpdate ] = "nothing") do={
|
:set ExitOK true;
|
||||||
$LogPrint info $ScriptName ("Found a stale scheduler for reboot, removing.");
|
:error "A reboot for update is already scheduled.";
|
||||||
/system/scheduler/remove "_RebootForUpdate";
|
|
||||||
} else={
|
|
||||||
$LogPrint info $ScriptName ("A reboot for update is already scheduled.");
|
|
||||||
:set ExitOK true;
|
|
||||||
:error false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$LogPrint debug $ScriptName ("Checking for updates...");
|
$LogPrint debug $ScriptName ("Checking for updates...");
|
||||||
|
|
@ -144,13 +140,13 @@
|
||||||
|
|
||||||
:if ([ :len $SafeUpdateUrl ] > 0) do={
|
:if ([ :len $SafeUpdateUrl ] > 0) do={
|
||||||
:local Result;
|
:local Result;
|
||||||
:onerror Err {
|
:do {
|
||||||
:set Result [ /tool/fetch check-certificate=yes-without-crl \
|
:set Result [ /tool/fetch check-certificate=yes-without-crl \
|
||||||
($SafeUpdateUrl . $Update->"channel" . "?installed=" . $Update->"installed-version" . \
|
($SafeUpdateUrl . $Update->"channel" . "?installed=" . $Update->"installed-version" . \
|
||||||
"&latest=" . $Update->"latest-version") http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) \
|
"&latest=" . $Update->"latest-version") http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) \
|
||||||
output=user as-value ];
|
output=user as-value ];
|
||||||
} do={
|
} on-error={
|
||||||
$LogPrint warning $ScriptName ("Failed receiving safe version for " . $Update->"channel" . ": " . $Err);
|
$LogPrint warning $ScriptName ("Failed receiving safe version for " . $Update->"channel" . ".");
|
||||||
}
|
}
|
||||||
:if ($Result->"status" = "finished" && $Result->"data" = $Update->"latest-version") do={
|
:if ($Result->"status" = "finished" && $Result->"data" = $Update->"latest-version") do={
|
||||||
$LogPrint info $ScriptName ("Version " . $Update->"latest-version" . " is considered safe, updating...");
|
$LogPrint info $ScriptName ("Version " . $Update->"latest-version" . " is considered safe, updating...");
|
||||||
|
|
@ -217,6 +213,6 @@
|
||||||
" is available for downgrade.");
|
" is available for downgrade.");
|
||||||
:set SentRouterosUpdateNotification ($Update->"latest-version");
|
:set SentRouterosUpdateNotification ($Update->"latest-version");
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,21 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: collect-wireless-mac.capsman
|
# RouterOS script: collect-wireless-mac.capsman
|
||||||
# Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: lease-script, order=40
|
# provides: lease-script, order=40
|
||||||
# requires RouterOS, version=7.17
|
# 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://rsc.eworm.de/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;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global Identity;
|
:global Identity;
|
||||||
|
|
@ -95,6 +95,6 @@
|
||||||
$LogPrint debug $ScriptName ("No mac address available... Ignoring.");
|
$LogPrint debug $ScriptName ("No mac address available... Ignoring.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,21 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: collect-wireless-mac.local
|
# RouterOS script: collect-wireless-mac.local
|
||||||
# Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: lease-script, order=40
|
# provides: lease-script, order=40
|
||||||
# requires RouterOS, version=7.17
|
# 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://rsc.eworm.de/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;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global Identity;
|
:global Identity;
|
||||||
|
|
@ -96,6 +96,6 @@
|
||||||
$LogPrint debug $ScriptName ("No mac address available... Ignoring.");
|
$LogPrint debug $ScriptName ("No mac address available... Ignoring.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: collect-wireless-mac%TEMPL%
|
# RouterOS script: collect-wireless-mac%TEMPL%
|
||||||
# Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: lease-script, order=40
|
# provides: lease-script, order=40
|
||||||
# requires RouterOS, version=7.17
|
# 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://rsc.eworm.de/doc/collect-wireless-mac.md
|
||||||
|
|
@ -12,11 +12,11 @@
|
||||||
# !! 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.
|
||||||
|
|
||||||
|
:global GlobalFunctionsReady;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global Identity;
|
:global Identity;
|
||||||
|
|
@ -113,6 +113,6 @@
|
||||||
$LogPrint debug $ScriptName ("No mac address available... Ignoring.");
|
$LogPrint debug $ScriptName ("No mac address available... Ignoring.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,21 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: collect-wireless-mac.wifi
|
# RouterOS script: collect-wireless-mac.wifi
|
||||||
# Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: lease-script, order=40
|
# provides: lease-script, order=40
|
||||||
# requires RouterOS, version=7.17
|
# 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://rsc.eworm.de/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;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global Identity;
|
:global Identity;
|
||||||
|
|
@ -95,6 +95,6 @@
|
||||||
$LogPrint debug $ScriptName ("No mac address available... Ignoring.");
|
$LogPrint debug $ScriptName ("No mac address available... Ignoring.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
# Makefile
|
|
||||||
|
|
||||||
HTML := $(shell grep -xl '<!-- static html //-->' *.html)
|
|
||||||
|
|
||||||
.PHONY: all docs clean
|
|
||||||
|
|
||||||
all: docs
|
|
||||||
|
|
||||||
badges.html: badges.md
|
|
||||||
markdown $< > $@
|
|
||||||
|
|
||||||
docs: static-html.sh $(HTML) badges.html
|
|
||||||
./static-html.sh $(HTML)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f badges.html
|
|
||||||
git checkout HEAD -- $(HTML)
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
|
||||||
[](https://t.me/routeros_scripts)
|
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# generate a checksums file as used by $ScriptInstallUpdate
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
md5sum $(find -name '*.rsc' | sort) | \
|
|
||||||
sed -e "s| \./||" -e 's|.rsc$||' | \
|
|
||||||
jq --raw-input --null-input '[ inputs | split (" ") | { (.[1]): (.[0]) }] | add'
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
sed \
|
|
||||||
-e "/^:global CommitId/c :global CommitId \"${COMMITID:-unknown}\";" \
|
|
||||||
-e "/^:global CommitInfo/c :global CommitInfo \"${COMMITINFO:-unknown}\";" \
|
|
||||||
< "${1}"
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
RELTO="$(dirname "${1}")"
|
|
||||||
|
|
||||||
sed \
|
|
||||||
-e "s|__TITLE__|$(head -n1 "${1}")|" \
|
|
||||||
-e "s|__GENERAL__|$(realpath --relative-to="${RELTO}" general/)|" \
|
|
||||||
-e "s|__ROOT__|$(realpath --relative-to="${RELTO}" ./)|" \
|
|
||||||
< "${0}.d/head.html"
|
|
||||||
|
|
||||||
markdown -f toc,idanchor "${1}" | sed \
|
|
||||||
-e 's/href="\([-_\./[:alnum:]]*\)\.md\(#[-[:alnum:]]*\)\?"/href="\1.html\2"/g' \
|
|
||||||
-e '/<h[1234] /s| id="\(.*\)">| id="\L\1">|' \
|
|
||||||
-e '/<h[1234] /s|-2[1789cd]-||g' -e '/<h[1234] /s|--26-amp-3b-||g' \
|
|
||||||
-e '/^<pre>/s|pre|pre class="code" onclick="CopyToClipboard(this)"|g' \
|
|
||||||
-e '/The above link may be broken on code hosting sites/s|blockquote|blockquote style="display: none;"|'
|
|
||||||
|
|
||||||
sed \
|
|
||||||
-e "s|__DATE__|${DATE:-$(date --rfc-email)}|" \
|
|
||||||
-e "s|__VERSION__|${VERSION:-unknown}|" \
|
|
||||||
< "${0}.d/foot.html"
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
|
|
||||||
<p class="foot">RouterOS Scripts documentation generated on <i>__DATE__</i> for <i>__VERSION__</i><br />
|
|
||||||
Copyright © 2013-2026 Christian Hesse <mail@eworm.de></p>
|
|
||||||
|
|
||||||
</body></html>
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
<!DOCTYPE html><html lang="en">
|
|
||||||
<head><meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
||||||
<title>RouterOS Scripts :: __TITLE__</title>
|
|
||||||
<link rel="stylesheet" type="text/css" href="__GENERAL__/style.css">
|
|
||||||
<link rel="icon" type="image/png" href="__ROOT__/logo.png">
|
|
||||||
<script type="text/javascript" src="__GENERAL__/clipboard.js"></script>
|
|
||||||
</head><body>
|
|
||||||
|
|
||||||
<table><tr>
|
|
||||||
<td><img src="__GENERAL__/eworm-meadow.avif" alt="eworm on meadow" /></td>
|
|
||||||
<td><img src="__GENERAL__/qr-code.png" alt="QR code: rsc.eworm.de" /></td>
|
|
||||||
<td class="head"><span class="top">RouterOS Scripts</span><br />
|
|
||||||
<span class="bottom">a collection of scripts for MikroTik RouterOS</span></td>
|
|
||||||
</tr></table>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
5
contrib/logo-color.d/style.css
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
body {
|
||||||
|
font-family: fira-sans, sans-serif;
|
||||||
|
font-size: 10pt;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
@ -1,30 +1,14 @@
|
||||||
<!DOCTYPE html><html lang="en">
|
<!DOCTYPE html>
|
||||||
<!-- static html //-->
|
<html lang="en">
|
||||||
<head><meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
<head>
|
||||||
<title>RouterOS Scripts :: Logo Color Changer</title>
|
<meta charset="UTF-8">
|
||||||
<link rel="stylesheet" type="text/css" href="../general/style.css">
|
<title>RouterOS-Scripts Logo Color Changer</title>
|
||||||
<link rel="icon" type="image/png" href="../logo.png">
|
<link rel="stylesheet" type="text/css" href="logo-color.d/style.css">
|
||||||
<script src="logo-color.d/script.js"></script>
|
<script src="logo-color.d/script.js"></script>
|
||||||
</head><body>
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
<table><tr>
|
<h1>RouterOS-Scripts Logo Color Changer</h1>
|
||||||
<td><img src="../general/eworm-meadow.avif" alt="eworm on meadow" /></td>
|
|
||||||
<td><img src="../general/qr-code.png" alt="QR code: rsc.eworm.de" /></td>
|
|
||||||
<td class="head"><span class="top">RouterOS Scripts</span><br />
|
|
||||||
<span class="bottom">a collection of scripts for MikroTik RouterOS</span></td>
|
|
||||||
</tr></table>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<h1>Logo Color Changer</h1>
|
|
||||||
|
|
||||||
<!-- badges here //-->
|
|
||||||
|
|
||||||
<p><a href="../README.md">⬅️ Go back to main README</a></p>
|
|
||||||
|
|
||||||
<blockquote style="/* display */"><p>💡️ <strong>Hint</strong>: This site or links
|
|
||||||
on it may be broken on code hosting sites. Use
|
|
||||||
<a href="https://rsc.eworm.de/main/contrib/logo-color.html">Logo Color Changer</a>
|
|
||||||
instead.</p></blockquote>
|
|
||||||
|
|
||||||
<p>You want the logo for your own notifications? But you joined the
|
<p>You want the logo for your own notifications? But you joined the
|
||||||
<a href="https://t.me/routeros_scripts">Telegram Group</a> and want
|
<a href="https://t.me/routeros_scripts">Telegram Group</a> and want
|
||||||
|
|
@ -40,23 +24,17 @@ something that differentiates? Color it!</p>
|
||||||
<p>Then right-click, click "<i>Take Screenshot</i>" and finally select the
|
<p>Then right-click, click "<i>Take Screenshot</i>" and finally select the
|
||||||
logo and download it.</p>
|
logo and download it.</p>
|
||||||
|
|
||||||
<p><img src="logo-color.d/browser-01.avif" alt="Screenshot Browser 01"></p>
|
<p><img src="logo-color.d/browser-01.avif" width=533 height=482 alt="Screenshot Browser 01">
|
||||||
<p><img src="logo-color.d/browser-02.avif" alt="Screenshot Browser 02"></p>
|
<img src="logo-color.d/browser-02.avif" width=533 height=482 alt="Screenshot Browser 02">
|
||||||
<p><img src="logo-color.d/browser-03.avif" alt="Screenshot Browser 03"></p>
|
<img src="logo-color.d/browser-03.avif" width=533 height=482 alt="Screenshot Browser 03"></p>
|
||||||
|
|
||||||
<p>(This example is with
|
<p>(This example is with
|
||||||
<a href="https://www.mozilla.org/de/firefox/new/">Firefox</a>. The workflow
|
<a href="https://www.mozilla.org/de/firefox/new/">Firefox</a>. The workflow
|
||||||
for other browsers may differ.)</p>
|
for other browsers may differ.)</p>
|
||||||
|
|
||||||
<p>See how to
|
<p>See how to
|
||||||
<a href="../doc/mod/notification-telegram.md#set-a-profile-photo">Set
|
<a href="../../about/doc/mod/notification-telegram.md#set-a-profile-photo">Set
|
||||||
a profile photo</a> for your Telegram bot.</p>
|
a profile photo</a> for your Telegram bot.</p>
|
||||||
|
|
||||||
<hr />
|
</body>
|
||||||
|
</html>
|
||||||
<p><a href="../README.md">⬅️ Go back to main README</a><br/>
|
|
||||||
<a href="#top">⬆️ Go back to top</a></p>
|
|
||||||
|
|
||||||
<p class="foot">Copyright © 2013-2026 Christian Hesse <mail@eworm.de></p>
|
|
||||||
|
|
||||||
</body></html>
|
|
||||||
|
|
|
||||||
36
contrib/notification.d/style.css
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
body {
|
||||||
|
font-family: fira-sans, sans-serif;
|
||||||
|
font-size: 10pt;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
div.notification {
|
||||||
|
position: relative;
|
||||||
|
float: right;
|
||||||
|
width: 600px;
|
||||||
|
border: 3px outset #6c5d53;
|
||||||
|
/* border-radius: 5px; */
|
||||||
|
padding: 10px;
|
||||||
|
background-color: #e6e6e6;
|
||||||
|
}
|
||||||
|
div.content {
|
||||||
|
padding-left: 60px;
|
||||||
|
}
|
||||||
|
img.logo {
|
||||||
|
float: left;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
p.heading {
|
||||||
|
margin: 0px;
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
p.hint {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
pre {
|
||||||
|
font-family: fira-mono, monospace;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
span.link {
|
||||||
|
color: #863600;
|
||||||
|
}
|
||||||
|
|
@ -1,57 +1,35 @@
|
||||||
<!DOCTYPE html><html lang="en">
|
<!DOCTYPE html>
|
||||||
<!-- static html //-->
|
<html lang="en">
|
||||||
<head><meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
<head>
|
||||||
<title>RouterOS Scripts :: Notification Generator</title>
|
<meta charset="UTF-8">
|
||||||
<link rel="stylesheet" type="text/css" href="../general/style.css">
|
<title>RouterOS-Scripts Notification Generator</title>
|
||||||
<link rel="icon" type="image/png" href="../logo.png">
|
<link rel="stylesheet" type="text/css" href="notification.d/style.css">
|
||||||
<script src="notification.d/script.js"></script>
|
<script src="notification.d/script.js"></script>
|
||||||
</head><body>
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
<table><tr>
|
<h1>RouterOS-Scripts Notification Generator</h1>
|
||||||
<td><img src="../general/eworm-meadow.avif" alt="eworm on meadow" /></td>
|
|
||||||
<td><img src="../general/qr-code.png" alt="QR code: rsc.eworm.de" /></td>
|
|
||||||
<td class="head"><span class="top">RouterOS Scripts</span><br />
|
|
||||||
<span class="bottom">a collection of scripts for MikroTik RouterOS</span></td>
|
|
||||||
</tr></table>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<h1>Notification Generator</h1>
|
|
||||||
|
|
||||||
<!-- badges here //-->
|
|
||||||
|
|
||||||
<p><a href="../README.md">⬅️ Go back to main README</a></p>
|
|
||||||
|
|
||||||
<blockquote style="/* display */"><p>💡️ <strong>Hint</strong>: This site or links
|
|
||||||
on it may be broken on code hosting sites. Use
|
|
||||||
<a href="https://rsc.eworm.de/main/contrib/notification.html">Notification Generator</a>
|
|
||||||
instead.</p></blockquote>
|
|
||||||
|
|
||||||
<div class="notification">
|
<div class="notification">
|
||||||
<img src="../logo.svg" alt="logo" class="logo" width=48 height=48>
|
<img src="../logo.svg" alt="logo" class="logo" width=48 height=48>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p id="heading" class="heading">[<span id="hostname">MikroTik</span>] <span id="subject">ℹ️ Subject</span></p>
|
<p id="heading" class="heading">[<span id="hostname">MikroTik</span>] <span id="subject">ℹ️ Subject</span></p>
|
||||||
<pre id="message">Message</pre>
|
<pre id="message">Message</pre>
|
||||||
<p id="link" class="hint">🔗 <span id="link-text" class="link">https://rsc.eworm.de/</span></p>
|
<p id="link" class="hint">🔗 <span id="link-text" class="link">https://eworm.de/</span></p>
|
||||||
<p id="queued" class="hint">⏰ This message was queued since <i><span id="queued-since">2025-10-29 16:06:18</span></i> and may be obsolete.</p>
|
<p id="queued" class="hint">⏰ This message was queued since <span id="queued-since">oct/18/2022 18:30:48</span> and may be obsolete.</p>
|
||||||
<p id="cut" class="hint">✂️ The message was too long and has been truncated, cut off <i><span id="cut-percent">13</span>%</i>!</p>
|
<p id="cut" class="hint">✂️ The message was too long and has been truncated, cut off <span id="cut-percent">13</span>%!</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>Hostname: <input type="text" value="MikroTik" onchange="update(this, 'hostname')"></p>
|
<p>Hostname: <input type="text" value="MikroTik" onchange="update(this, 'hostname')"></p>
|
||||||
<p>Subject: <input type="text" size=50 value="ℹ️ Subject" onchange="update(this, 'subject')"></p>
|
<p>Subject: <input type="text" size=50 value="ℹ️ Subject" onchange="update(this, 'subject')"></p>
|
||||||
<p>Message: <textarea id="w3review" name="w3review" rows="4" cols="50" onchange="update(this, 'message')">Message</textarea></p>
|
<p>Message: <textarea id="w3review" name="w3review" rows="4" cols="50" onchange="update(this, 'message')">Message</textarea></p>
|
||||||
<p><input type="checkbox" onclick="visible(this, 'link')"> Show link: <input type="text" value="https://rsc.eworm.de/" onchange="update(this, 'link-text')"></p>
|
<p><input type="checkbox" onclick="visible(this, 'link')"> Show link: <input type="text" value="https://eworm.de/" onchange="update(this, 'link-text')"></p>
|
||||||
<p><input type="checkbox" onclick="visible(this, 'queued')"> Queued since <input type="text" value="2025-10-29 16:06:18" onchange="update(this, 'queued-since')"></p>
|
<p><input type="checkbox" onclick="visible(this, 'queued')"> Queued since <input type="text" value="oct/18/2022 18:30:48" onchange="update(this, 'queued-since')"></p>
|
||||||
<p><input type="checkbox" onclick="visible(this, 'cut')"> Cut-off with <input type="number" min=1 max=99 value=13 onchange="update(this, 'cut-percent')"> percent</p>
|
<p><input type="checkbox" onclick="visible(this, 'cut')"> Cut-off with <input type="number" min=1 max=99 value=13 onchange="update(this, 'cut-percent')"> percent</p>
|
||||||
|
|
||||||
<p>Then right-click, click "<i>Take Screenshot</i>" and finally select the
|
<p>Then right-click, click "<i>Take Screenshot</i>" and finally select the
|
||||||
notification and download it.</p>
|
notification and download it.</p>
|
||||||
|
|
||||||
<hr />
|
</body>
|
||||||
|
</html>
|
||||||
<p><a href="../README.md">⬅️ Go back to main README</a><br/>
|
|
||||||
<a href="#top">⬆️ Go back to top</a></p>
|
|
||||||
|
|
||||||
<p class="foot">Copyright © 2013-2026 Christian Hesse <mail@eworm.de></p>
|
|
||||||
|
|
||||||
</body></html>
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
sed -i \
|
|
||||||
-e '/href=/s|\.md|\.html|' \
|
|
||||||
-e '/blockquote/s|/\* display \*/|display: none;|' \
|
|
||||||
-e '/<!-- badges here \/\/-->/r badges.html' \
|
|
||||||
-e '/<!-- badges here \/\/-->/d' \
|
|
||||||
"${@}"
|
|
||||||
|
|
@ -1,274 +0,0 @@
|
||||||
Telegram
|
|
||||||
========
|
|
||||||
|
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
|
||||||
[](https://t.me/routeros_scripts)
|
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
|
||||||
|
|
||||||
[⬅️ Go back to main README](../README.md)
|
|
||||||
|
|
||||||
We have [Miss Rose Bot ↗️](https://t.me/MissRose_bot) in our
|
|
||||||
[RouterOS-Scripts ↗️](https://t.me/routeros_scripts) Telegram group,
|
|
||||||
always kind and ready to help moderate.
|
|
||||||
|
|
||||||
Notes
|
|
||||||
-----
|
|
||||||
|
|
||||||
### README
|
|
||||||
|
|
||||||
/save readme Please read the [main README](https://rsc.eworm.de/) to understand how things work and to get the base installation right.
|
|
||||||
|
|
||||||
### Available scripts
|
|
||||||
|
|
||||||
#### accesslist-duplicates
|
|
||||||
|
|
||||||
/save accesslist-duplicates Find and remove access list duplicates with [accesslist-duplicates](https://rsc.eworm.de/doc/accesslist-duplicates.md).
|
|
||||||
|
|
||||||
#### backup-cloud
|
|
||||||
|
|
||||||
/save backup-cloud Upload backup to Mikrotik cloud with [backup-cloud](https://rsc.eworm.de/doc/backup-cloud.md).
|
|
||||||
|
|
||||||
#### backup-email
|
|
||||||
|
|
||||||
/save backup-email Send backup via e-mail with [backup-email](https://rsc.eworm.de/doc/backup-email.md).
|
|
||||||
|
|
||||||
#### backup-partition
|
|
||||||
|
|
||||||
/save backup-partition Save configuration to fallback partition with [backup-partition](https://rsc.eworm.de/doc/backup-partition.md).
|
|
||||||
|
|
||||||
#### backup-upload
|
|
||||||
|
|
||||||
/save backup-upload Upload backup to server with [backup-upload](https://rsc.eworm.de/doc/backup-upload.md).
|
|
||||||
|
|
||||||
#### capsman-download-packages
|
|
||||||
|
|
||||||
/save capsman-download-packages Download packages for CAP upgrade from CAPsMAN with [capsman-download-packages](https://rsc.eworm.de/doc/capsman-download-packages.md).
|
|
||||||
|
|
||||||
#### capsman-rolling-upgrade
|
|
||||||
|
|
||||||
/save capsman-rolling-upgrade Run rolling CAP upgrades from CAPsMAN with [capsman-rolling-upgrade](https://rsc.eworm.de/doc/capsman-rolling-upgrade.md).
|
|
||||||
|
|
||||||
#### certificate-renew-issued
|
|
||||||
|
|
||||||
/save certificate-renew-issued Renew locally issued certificates with [certificate-renew-issued](https://rsc.eworm.de/doc/certificate-renew-issued.md).
|
|
||||||
|
|
||||||
#### check-certificates
|
|
||||||
|
|
||||||
/save check-certificates Renew certificates and notify on expiration with [check-certificates](https://rsc.eworm.de/doc/check-certificates.md).
|
|
||||||
|
|
||||||
#### check-health
|
|
||||||
|
|
||||||
/save check-health Notify about health state with [check-health](https://rsc.eworm.de/doc/check-health.md).
|
|
||||||
|
|
||||||
#### check-lte-firmware-upgrade
|
|
||||||
|
|
||||||
/save check-lte-firmware-upgrade Notify on LTE firmware upgrade with [check-lte-firmware-upgrade](https://rsc.eworm.de/doc/check-lte-firmware-upgrade.md).
|
|
||||||
|
|
||||||
#### check-perpetual-license
|
|
||||||
|
|
||||||
/save check-perpetual-license Check perpetual license on CHR with [check-perpetual-license](https://rsc.eworm.de/doc/check-perpetual-license.md).
|
|
||||||
|
|
||||||
#### check-routeros-update
|
|
||||||
|
|
||||||
/save check-routeros-update Notify on RouterOS update with [check-routeros-update](https://rsc.eworm.de/doc/check-routeros-update.md).
|
|
||||||
|
|
||||||
#### collect-wireless-mac
|
|
||||||
|
|
||||||
/save collect-wireless-mac Collect MAC addresses in wireless access list with [collect-wireless-mac](https://rsc.eworm.de/doc/collect-wireless-mac.md).
|
|
||||||
|
|
||||||
#### daily-psk
|
|
||||||
|
|
||||||
/save daily-psk Use wireless network with [daily-psk](https://rsc.eworm.de/doc/daily-psk.md).
|
|
||||||
|
|
||||||
#### dhcp-lease-comment
|
|
||||||
|
|
||||||
/save dhcp-lease-comment Comment DHCP leases with [dhcp-lease-comment](https://rsc.eworm.de/doc/dhcp-lease-comment.md).
|
|
||||||
|
|
||||||
#### dhcp-to-dns
|
|
||||||
|
|
||||||
/save dhcp-to-dns Create DNS records for DHCP leases with [dhcp-to-dns](https://rsc.eworm.de/doc/dhcp-to-dns.md).
|
|
||||||
|
|
||||||
#### firmware-upgrade-reboot
|
|
||||||
|
|
||||||
/save firmware-upgrade-reboot Automatically upgrade firmware and reboot with [firmware-upgrade-reboot](https://rsc.eworm.de/doc/firmware-upgrade-reboot.md).
|
|
||||||
|
|
||||||
#### fw-addr-lists
|
|
||||||
|
|
||||||
/save fw-addr-lists Download, import and update firewall address-lists with [fw-addr-lists](https://rsc.eworm.de/doc/fw-addr-lists.md).
|
|
||||||
|
|
||||||
#### global-wait
|
|
||||||
|
|
||||||
/save global-wait Wait for global functions und modules with [global-wait](https://rsc.eworm.de/doc/global-wait.md).
|
|
||||||
|
|
||||||
#### gps-track
|
|
||||||
|
|
||||||
/save gps-track Send GPS position to server with [gps-track](https://rsc.eworm.de/doc/gps-track.md).
|
|
||||||
|
|
||||||
#### hotspot-to-wpa
|
|
||||||
|
|
||||||
/save hotspot-to-wpa Use WPA network with [hotspot-to-wpa](https://rsc.eworm.de/doc/hotspot-to-wpa.md).
|
|
||||||
|
|
||||||
#### ipsec-to-dns
|
|
||||||
|
|
||||||
/save ipsec-to-dns Create DNS records for IPSec peers with [ipsec-to-dns](https://rsc.eworm.de/doc/ipsec-to-dns.md).
|
|
||||||
|
|
||||||
#### ipv6-update
|
|
||||||
|
|
||||||
/save ipv6-update Update configuration on IPv6 prefix change with [ipv6-update](https://rsc.eworm.de/doc/ipv6-update.md).
|
|
||||||
|
|
||||||
#### ip-addr-bridge
|
|
||||||
|
|
||||||
/save ip-addr-bridge Manage IP addresses with [ip-addr-bridge](https://rsc.eworm.de/doc/ip-addr-bridge.md).
|
|
||||||
|
|
||||||
#### lease-script
|
|
||||||
|
|
||||||
/save lease-script Run other scripts on DHCP lease with [lease-script](https://rsc.eworm.de/doc/lease-script.md).
|
|
||||||
|
|
||||||
#### leds-mode
|
|
||||||
|
|
||||||
/save leds-mode Manage LEDs dark mode with [leds-mode](https://rsc.eworm.de/doc/leds-mode.md).
|
|
||||||
|
|
||||||
#### log-forward
|
|
||||||
|
|
||||||
/save log-forward Forward log messages via notification with [log-forward](https://rsc.eworm.de/doc/log-forward.md).
|
|
||||||
|
|
||||||
#### mode-button
|
|
||||||
|
|
||||||
/save mode-button Mode button with [mode-button](https://rsc.eworm.de/doc/mode-button.md).
|
|
||||||
|
|
||||||
#### netwatch-dns
|
|
||||||
|
|
||||||
/save netwatch-dns Manage DNS and DoH servers from netwatch with [netwatch-dns](https://rsc.eworm.de/doc/netwatch-dns.md).
|
|
||||||
|
|
||||||
#### netwatch-notify
|
|
||||||
|
|
||||||
/save netwatch-notify Notify on host up and down with [netwatch-notify](https://rsc.eworm.de/doc/netwatch-notify.md).
|
|
||||||
|
|
||||||
#### ospf-to-leds
|
|
||||||
|
|
||||||
/save ospf-to-leds Visualize OSPF state via LEDs with [ospf-to-leds](https://rsc.eworm.de/doc/ospf-to-leds.md).
|
|
||||||
|
|
||||||
#### packages-update
|
|
||||||
|
|
||||||
/save packages-update Manage system update with [packages-update](https://rsc.eworm.de/doc/packages-update.md).
|
|
||||||
|
|
||||||
#### ppp-on-up
|
|
||||||
|
|
||||||
/save ppp-on-up Run scripts on ppp connection with [ppp-on-up](https://rsc.eworm.de/doc/ppp-on-up.md).
|
|
||||||
|
|
||||||
#### sms-action
|
|
||||||
|
|
||||||
/save sms-action Act on received SMS with [sms-action](https://rsc.eworm.de/doc/sms-action.md).
|
|
||||||
|
|
||||||
#### sms-forward
|
|
||||||
|
|
||||||
/save sms-forward Forward received SMS with [sms-forward](https://rsc.eworm.de/doc/sms-forward.md).
|
|
||||||
|
|
||||||
#### super-mario-theme
|
|
||||||
|
|
||||||
/save super-mario-theme Play Super Mario theme with [super-mario-theme](https://rsc.eworm.de/doc/super-mario-theme.md).
|
|
||||||
|
|
||||||
#### telegram-chat
|
|
||||||
|
|
||||||
/save telegram-chat Chat with [telegram-chat](https://rsc.eworm.de/doc/telegram-chat.md).
|
|
||||||
|
|
||||||
#### unattended-lte-firmware-upgrade
|
|
||||||
|
|
||||||
/save unattended-lte-firmware-upgrade Install LTE firmware upgrade with [unattended-lte-firmware-upgrade](https://rsc.eworm.de/doc/unattended-lte-firmware-upgrade.md).
|
|
||||||
|
|
||||||
#### update-gre-address
|
|
||||||
|
|
||||||
/save update-gre-address Update GRE configuration with [update-gre-address](https://rsc.eworm.de/doc/update-gre-address.md).
|
|
||||||
|
|
||||||
#### update-tunnelbroker
|
|
||||||
|
|
||||||
/save update-tunnelbroker Update tunnelbroker configuration with [update-tunnelbroker](https://rsc.eworm.de/doc/update-tunnelbroker.md).
|
|
||||||
|
|
||||||
### Available modules
|
|
||||||
|
|
||||||
#### mod/bridge-port-to
|
|
||||||
|
|
||||||
/save mod/bridge-port-to Manage ports in bridge with [mod/bridge-port-to](https://rsc.eworm.de/doc/mod/bridge-port-to.md).
|
|
||||||
|
|
||||||
#### mod/bridge-port-vlan
|
|
||||||
|
|
||||||
/save mod/bridge-port-vlan Manage VLANs on bridge ports with [mod/bridge-port-vlan](https://rsc.eworm.de/doc/mod/bridge-port-vlan.md).
|
|
||||||
|
|
||||||
#### mod/inspectvar
|
|
||||||
|
|
||||||
/save mod/inspectvar Inspect variables with [mod/inspectvar](https://rsc.eworm.de/doc/mod/inspectvar.md).
|
|
||||||
|
|
||||||
#### mod/ipcalc
|
|
||||||
|
|
||||||
/save mod/ipcalc IP address calculation with [mod/ipcalc](https://rsc.eworm.de/doc/mod/ipcalc.md).
|
|
||||||
|
|
||||||
#### mod/notification-email
|
|
||||||
|
|
||||||
/save mod/notification-email Send notifications via e-mail with [mod/notification-email](https://rsc.eworm.de/doc/mod/notification-email.md).
|
|
||||||
|
|
||||||
#### mod/notification-gotify
|
|
||||||
|
|
||||||
/save mod/notification-gotify Send notifications via Gotify with [mod/notification-gotify](https://rsc.eworm.de/doc/mod/notification-gotify.md).
|
|
||||||
|
|
||||||
#### mod/notification-matrix
|
|
||||||
|
|
||||||
/save mod/notification-matrix Send notifications via Matrix with [mod/notification-matrix](https://rsc.eworm.de/doc/mod/notification-matrix.md).
|
|
||||||
|
|
||||||
#### mod/notification-ntfy
|
|
||||||
|
|
||||||
/save mod/notification-ntfy Send notifications via Ntfy with [mod/notification-ntfy](https://rsc.eworm.de/doc/mod/notification-ntfy.md).
|
|
||||||
|
|
||||||
#### mod/notification-telegram
|
|
||||||
|
|
||||||
/save mod/notification-telegram Send notifications via Telegram with [mod/notification-telegram](https://rsc.eworm.de/doc/mod/notification-telegram.md).
|
|
||||||
|
|
||||||
#### mod/scriptrunonce
|
|
||||||
|
|
||||||
/save mod/scriptrunonce Download script and run it once with [mod/scriptrunonce](https://rsc.eworm.de/doc/mod/scriptrunonce.md).
|
|
||||||
|
|
||||||
#### mod/ssh-keys-import
|
|
||||||
|
|
||||||
/save mod/ssh-keys-import Import ssh keys for public key authentication with [mod/ssh-keys-import](https://rsc.eworm.de/doc/mod/ssh-keys-import.md).
|
|
||||||
|
|
||||||
### Other
|
|
||||||
|
|
||||||
#### Installing from branches
|
|
||||||
|
|
||||||
/save branches Living on the edge or testing new features? Learn how to [switch specific scripts or the complete installation to different branches](https://rsc.eworm.de/BRANCHES.md).
|
|
||||||
|
|
||||||
#### Certificate name from browser
|
|
||||||
|
|
||||||
/save certificate-name-from-browser Running or accessing a custom service and looking for the CA certificate? Get the [certificate name from browser](https://rsc.eworm.de/CERTIFICATES.md).
|
|
||||||
|
|
||||||
#### Debug output and logs
|
|
||||||
|
|
||||||
/save debug Enable [debug output and logs](https://rsc.eworm.de/DEBUG.md) for more information on what happens.
|
|
||||||
|
|
||||||
#### Donate
|
|
||||||
|
|
||||||
/save donate This project is developed in private spare time and usage is free of charge for you. If you like the scripts and think this is of value for you or your business [please consider a donation](https://rsc.eworm.de/#donate). Thanks!
|
|
||||||
|
|
||||||
#### Fix existing installation
|
|
||||||
|
|
||||||
/save fix-installation [Fix existing installation] Your installation broke and you do not know back and forth? See how to [fix an existing installation](https://rsc.eworm.de/INITIAL-COMMANDS.md#fix-existing-installation).
|
|
||||||
|
|
||||||
#### Next!
|
|
||||||
|
|
||||||
/save next Another satisfied user. 😊 Next, please!
|
|
||||||
|
|
||||||
#### Off-topic
|
|
||||||
|
|
||||||
/save off-topic Please note this group is not about MikroTik RouterOS in general, but [RouterOS Scripts](https://rsc.eworm.de/). Your request is not about scripting at all, so please discuss somewhere else. See the [MikroTik RouterOS users (english)](https://t.me/RouterOS_users_english) group or official Mikrotik forums (https://forum.mikrotik.com/).
|
|
||||||
|
|
||||||
Greeting
|
|
||||||
--------
|
|
||||||
|
|
||||||
/setwelcome Hello {mention}, and welcome to {chatname}!
|
|
||||||
Please note this group is not about RouterOS in general, but [RouterOS Scripts](https://rsc.eworm.de/). Also pay attention to [rules](https://t.me/routeros_scripts/4), thanks!
|
|
||||||
|
|
||||||
---
|
|
||||||
[⬅️ Go back to main README](../README.md)
|
|
||||||
[⬆️ Go back to top](#top)
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
sed \
|
|
||||||
-e '/\/interface\/wifi\//d' \
|
|
||||||
-e '/\/interface\/wireless\//d' \
|
|
||||||
-e 's|%TEMPL%|.capsman|' \
|
|
||||||
-e '/^# NOT \/caps-man\/ #$/,/^# NOT \/caps-man\/ #$/d' \
|
|
||||||
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
|
|
||||||
< "${1}"
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
sed \
|
|
||||||
-e '/\/caps-man\//d' \
|
|
||||||
-e '/\/interface\/wifi\//d' \
|
|
||||||
-e 's|%TEMPL%|.local|' \
|
|
||||||
-e '/^# NOT \/interface\/wireless\/ #$/,/^# NOT \/interface\/wireless\/ #$/d' \
|
|
||||||
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
|
|
||||||
< "${1}"
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
sed \
|
|
||||||
-e '/\/caps-man\//d' \
|
|
||||||
-e '/\/interface\/wireless\//d' \
|
|
||||||
-e 's|%TEMPL%|.wifi|' \
|
|
||||||
-e '/^# NOT \/interface\/wifi\/ #$/,/^# NOT \/interface\/wifi\/ #$/d' \
|
|
||||||
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
|
|
||||||
< "${1}"
|
|
||||||
|
|
@ -1,21 +1,21 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: daily-psk.capsman
|
# RouterOS script: daily-psk.capsman
|
||||||
# Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
||||||
# Michael Gisbers <michael@gisbers.de>
|
# Michael Gisbers <michael@gisbers.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.17
|
# 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://rsc.eworm.de/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;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global DailyPskMatchComment;
|
:global DailyPskMatchComment;
|
||||||
|
|
@ -91,6 +91,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,21 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: daily-psk.local
|
# RouterOS script: daily-psk.local
|
||||||
# Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
||||||
# Michael Gisbers <michael@gisbers.de>
|
# Michael Gisbers <michael@gisbers.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.17
|
# 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://rsc.eworm.de/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;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global DailyPskMatchComment;
|
:global DailyPskMatchComment;
|
||||||
|
|
@ -90,6 +90,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: daily-psk%TEMPL%
|
# RouterOS script: daily-psk%TEMPL%
|
||||||
# Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
||||||
# Michael Gisbers <michael@gisbers.de>
|
# Michael Gisbers <michael@gisbers.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.17
|
# 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://rsc.eworm.de/doc/daily-psk.md
|
||||||
|
|
@ -12,11 +12,11 @@
|
||||||
# !! 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.
|
||||||
|
|
||||||
|
:global GlobalFunctionsReady;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global DailyPskMatchComment;
|
:global DailyPskMatchComment;
|
||||||
|
|
@ -106,6 +106,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,21 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: daily-psk.wifi
|
# RouterOS script: daily-psk.wifi
|
||||||
# Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
||||||
# Michael Gisbers <michael@gisbers.de>
|
# Michael Gisbers <michael@gisbers.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# requires RouterOS, version=7.17
|
# 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://rsc.eworm.de/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;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global DailyPskMatchComment;
|
:global DailyPskMatchComment;
|
||||||
|
|
@ -91,6 +91,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,21 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: dhcp-lease-comment.capsman
|
# RouterOS script: dhcp-lease-comment.capsman
|
||||||
# Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: lease-script, order=60
|
# provides: lease-script, order=60
|
||||||
# requires RouterOS, version=7.17
|
# 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://rsc.eworm.de/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;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
|
|
@ -38,6 +38,6 @@
|
||||||
/ip/dhcp-server/lease/set comment=$NewComment $Lease;
|
/ip/dhcp-server/lease/set comment=$NewComment $Lease;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,21 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: dhcp-lease-comment.local
|
# RouterOS script: dhcp-lease-comment.local
|
||||||
# Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: lease-script, order=60
|
# provides: lease-script, order=60
|
||||||
# requires RouterOS, version=7.17
|
# 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://rsc.eworm.de/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;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
|
|
@ -38,6 +38,6 @@
|
||||||
/ip/dhcp-server/lease/set comment=$NewComment $Lease;
|
/ip/dhcp-server/lease/set comment=$NewComment $Lease;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: dhcp-lease-comment%TEMPL%
|
# RouterOS script: dhcp-lease-comment%TEMPL%
|
||||||
# Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: lease-script, order=60
|
# provides: lease-script, order=60
|
||||||
# requires RouterOS, version=7.17
|
# 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://rsc.eworm.de/doc/dhcp-lease-comment.md
|
||||||
|
|
@ -12,11 +12,11 @@
|
||||||
# !! 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.
|
||||||
|
|
||||||
|
:global GlobalFunctionsReady;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
|
|
@ -43,6 +43,6 @@
|
||||||
/ip/dhcp-server/lease/set comment=$NewComment $Lease;
|
/ip/dhcp-server/lease/set comment=$NewComment $Lease;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,21 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: dhcp-lease-comment.wifi
|
# RouterOS script: dhcp-lease-comment.wifi
|
||||||
# Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: lease-script, order=60
|
# provides: lease-script, order=60
|
||||||
# requires RouterOS, version=7.17
|
# 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://rsc.eworm.de/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;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
|
|
@ -38,6 +38,6 @@
|
||||||
/ip/dhcp-server/lease/set comment=$NewComment $Lease;
|
/ip/dhcp-server/lease/set comment=$NewComment $Lease;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
#!rsc by RouterOS
|
#!rsc by RouterOS
|
||||||
# RouterOS script: dhcp-to-dns
|
# RouterOS script: dhcp-to-dns
|
||||||
# Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
|
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
||||||
# https://rsc.eworm.de/COPYING.md
|
# https://rsc.eworm.de/COPYING.md
|
||||||
#
|
#
|
||||||
# provides: lease-script, order=20
|
# provides: lease-script, order=20
|
||||||
# requires RouterOS, version=7.17
|
# requires RouterOS, version=7.16
|
||||||
#
|
#
|
||||||
# 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://rsc.eworm.de/doc/dhcp-to-dns.md
|
||||||
|
|
||||||
|
:global GlobalFunctionsReady;
|
||||||
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:do {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
|
||||||
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
|
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global Domain;
|
:global Domain;
|
||||||
|
|
@ -125,6 +125,6 @@
|
||||||
$LogPrint debug $ScriptName ("No address available... Ignoring.");
|
$LogPrint debug $ScriptName ("No address available... Ignoring.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} on-error={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 5.1 KiB |
|
|
@ -4,7 +4,7 @@ Find and remove access list duplicates
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 11 KiB |
|
|
@ -4,7 +4,7 @@ Upload backup to Mikrotik cloud
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
@ -17,7 +17,7 @@ Description
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
This script uploads
|
This script uploads
|
||||||
[binary backup to Mikrotik cloud ↗️](https://wiki.mikrotik.com/wiki/Manual:IP/Cloud#Backup).
|
[binary backup to Mikrotik cloud](https://wiki.mikrotik.com/wiki/Manual:IP/Cloud#Backup).
|
||||||
|
|
||||||
> ⚠️ **Warning**: The used command can hit errors that a script can with
|
> ⚠️ **Warning**: The used command can hit errors that a script can with
|
||||||
> workaround only. A notification *should* be sent anyway. But it can result
|
> workaround only. A notification *should* be sent anyway. But it can result
|
||||||
|
|
@ -49,7 +49,6 @@ The configuration goes to `global-config-overlay`, these are the parameters:
|
||||||
|
|
||||||
Also notification settings are required for
|
Also notification settings are required for
|
||||||
[e-mail](mod/notification-email.md),
|
[e-mail](mod/notification-email.md),
|
||||||
[gotify](mod/notification-gotify.md),
|
|
||||||
[matrix](mod/notification-matrix.md),
|
[matrix](mod/notification-matrix.md),
|
||||||
[ntfy](mod/notification-ntfy.md) and/or
|
[ntfy](mod/notification-ntfy.md) and/or
|
||||||
[telegram](mod/notification-telegram.md).
|
[telegram](mod/notification-telegram.md).
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Send backup via e-mail
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Save configuration to fallback partition
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
@ -17,7 +17,7 @@ Description
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
This script saves the current configuration to fallback
|
This script saves the current configuration to fallback
|
||||||
[partition ↗️](https://wiki.mikrotik.com/wiki/Manual:Partitions).
|
[partition](https://wiki.mikrotik.com/wiki/Manual:Partitions).
|
||||||
It can also copy-over the RouterOS installation when run interactively
|
It can also copy-over the RouterOS installation when run interactively
|
||||||
or just before a feature update.
|
or just before a feature update.
|
||||||
|
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 12 KiB |
|
|
@ -4,7 +4,7 @@ Upload backup to server
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
@ -55,7 +55,6 @@ The configuration goes to `global-config-overlay`, these are the parameters:
|
||||||
|
|
||||||
Also notification settings are required for
|
Also notification settings are required for
|
||||||
[e-mail](mod/notification-email.md),
|
[e-mail](mod/notification-email.md),
|
||||||
[gotify](mod/notification-gotify.md),
|
|
||||||
[matrix](mod/notification-matrix.md),
|
[matrix](mod/notification-matrix.md),
|
||||||
[ntfy](mod/notification-ntfy.md) and/or
|
[ntfy](mod/notification-ntfy.md) and/or
|
||||||
[telegram](mod/notification-telegram.md).
|
[telegram](mod/notification-telegram.md).
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Download packages for CAP upgrade from CAPsMAN
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Run rolling CAP upgrades from CAPsMAN
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Renew locally issued certificates
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 8.6 KiB |
BIN
doc/check-certificates.d/notification.avif
Normal file
|
After Width: | Height: | Size: 25 KiB |
|
|
@ -4,7 +4,7 @@ Renew certificates and notify on expiration
|
||||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||||
[](https://mikrotik.com/download/changelogs/)
|
[](https://mikrotik.com/download/changelogs/)
|
||||||
[](https://t.me/routeros_scripts)
|
[](https://t.me/routeros_scripts)
|
||||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||||
|
|
||||||
|
|
@ -19,10 +19,9 @@ Description
|
||||||
This script tries to download and renew certificates, then notifies about
|
This script tries to download and renew certificates, then notifies about
|
||||||
certificates that are still about to expire.
|
certificates that are still about to expire.
|
||||||
|
|
||||||
### Sample notifications
|
### Sample notification
|
||||||
|
|
||||||

|

|
||||||

|
|
||||||
|
|
||||||
Requirements and installation
|
Requirements and installation
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
@ -52,7 +51,6 @@ subject alternative name (aka *Subject Alt Name* or *SAN*) can be used.
|
||||||
|
|
||||||
Also notification settings are required for
|
Also notification settings are required for
|
||||||
[e-mail](mod/notification-email.md),
|
[e-mail](mod/notification-email.md),
|
||||||
[gotify](mod/notification-gotify.md),
|
|
||||||
[matrix](mod/notification-matrix.md),
|
[matrix](mod/notification-matrix.md),
|
||||||
[ntfy](mod/notification-ntfy.md) and/or
|
[ntfy](mod/notification-ntfy.md) and/or
|
||||||
[telegram](mod/notification-telegram.md).
|
[telegram](mod/notification-telegram.md).
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.7 KiB |