aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/accesslist-duplicates.md28
-rw-r--r--doc/backup-cloud.d/notification.avifbin0 -> 11629 bytes
-rw-r--r--doc/backup-cloud.d/notification.svg46
-rw-r--r--doc/backup-cloud.md30
-rw-r--r--doc/backup-email.md18
-rw-r--r--doc/backup-partition.md22
-rw-r--r--doc/backup-upload.d/notification.avifbin0 -> 11776 bytes
-rw-r--r--doc/backup-upload.d/notification.svg45
-rw-r--r--doc/backup-upload.md23
-rw-r--r--doc/capsman-download-packages.md50
-rw-r--r--doc/capsman-rolling-upgrade.md27
-rw-r--r--doc/certificate-renew-issued.md17
-rw-r--r--doc/check-certificates.d/notification.avifbin0 -> 25274 bytes
-rw-r--r--doc/check-certificates.d/notification.svg41
-rw-r--r--doc/check-certificates.md50
-rw-r--r--doc/check-health.d/notification-01-cpu-utilization-high.avifbin0 -> 6481 bytes
-rw-r--r--doc/check-health.d/notification-01-voltage.svg36
-rw-r--r--doc/check-health.d/notification-02-cpu-utilization-ok.avifbin0 -> 6797 bytes
-rw-r--r--doc/check-health.d/notification-02-temperature-high.svg33
-rw-r--r--doc/check-health.d/notification-03-ram-utilization-high.avifbin0 -> 7527 bytes
-rw-r--r--doc/check-health.d/notification-03-temperature-ok.svg33
-rw-r--r--doc/check-health.d/notification-04-psu-fail.svg33
-rw-r--r--doc/check-health.d/notification-04-ram-utilization-ok.avifbin0 -> 6637 bytes
-rw-r--r--doc/check-health.d/notification-05-psu-ok.svg33
-rw-r--r--doc/check-health.d/notification-05-voltage.avifbin0 -> 3829 bytes
-rw-r--r--doc/check-health.d/notification-06-temperature-high.avifbin0 -> 3519 bytes
-rw-r--r--doc/check-health.d/notification-07-temperature-ok.avifbin0 -> 3727 bytes
-rw-r--r--doc/check-health.d/notification-08-psu-fail.avifbin0 -> 3474 bytes
-rw-r--r--doc/check-health.d/notification-09-psu-ok.avifbin0 -> 3531 bytes
-rw-r--r--doc/check-health.md56
-rw-r--r--doc/check-lte-firmware-upgrade.d/notification.avifbin0 -> 5077 bytes
-rw-r--r--doc/check-lte-firmware-upgrade.d/notification.svg38
-rw-r--r--doc/check-lte-firmware-upgrade.md15
-rw-r--r--doc/check-routeros-update.d/notification.avifbin0 -> 6392 bytes
-rw-r--r--doc/check-routeros-update.d/notification.svg45
-rw-r--r--doc/check-routeros-update.md50
-rw-r--r--doc/collect-wireless-mac.d/notification.avifbin0 -> 13378 bytes
-rw-r--r--doc/collect-wireless-mac.d/notification.svg44
-rw-r--r--doc/collect-wireless-mac.md31
-rw-r--r--doc/daily-psk.d/notification.avifbin0 -> 7040 bytes
-rw-r--r--doc/daily-psk.d/notification.svg40
-rw-r--r--doc/daily-psk.md57
-rw-r--r--doc/dhcp-lease-comment.md26
-rw-r--r--doc/dhcp-to-dns.md57
-rw-r--r--doc/firmware-upgrade-reboot.md13
-rw-r--r--doc/fw-addr-lists.md132
-rw-r--r--doc/global-wait.md13
-rw-r--r--doc/gps-track.md17
-rw-r--r--doc/hotspot-to-wpa.md80
-rw-r--r--doc/ip-addr-bridge.md13
-rw-r--r--doc/ipsec-to-dns.md17
-rw-r--r--doc/ipv6-update.md20
-rw-r--r--doc/lease-script.md15
-rw-r--r--doc/leds-mode.md13
-rw-r--r--doc/log-forward.d/notification.avifbin0 -> 6178 bytes
-rw-r--r--doc/log-forward.d/notification.svg37
-rw-r--r--doc/log-forward.md59
-rw-r--r--doc/mod/bridge-port-to.md13
-rw-r--r--doc/mod/bridge-port-vlan.md13
-rw-r--r--doc/mod/inspectvar.md13
-rw-r--r--doc/mod/ipcalc.md13
-rw-r--r--doc/mod/notification-email.md39
-rw-r--r--doc/mod/notification-matrix.d/01-authenticate.avifbin0 -> 3870 bytes
-rw-r--r--doc/mod/notification-matrix.d/01-home-server.avifbin2317 -> 0 bytes
-rw-r--r--doc/mod/notification-matrix.d/02-access-token.avifbin4105 -> 0 bytes
-rw-r--r--doc/mod/notification-matrix.d/02-join-room.avifbin0 -> 3745 bytes
-rw-r--r--doc/mod/notification-matrix.d/03-join-room.avifbin3166 -> 0 bytes
-rw-r--r--doc/mod/notification-matrix.md111
-rw-r--r--doc/mod/notification-ntfy.md91
-rw-r--r--doc/mod/notification-telegram.d/setuserpic.avifbin0 -> 38522 bytes
-rw-r--r--doc/mod/notification-telegram.md52
-rw-r--r--doc/mod/scriptrunonce.md21
-rw-r--r--doc/mod/ssh-keys-import.md73
-rw-r--r--doc/mode-button.md19
-rw-r--r--doc/netwatch-dns.md24
-rw-r--r--doc/netwatch-notify.d/notification-01-down.avifbin0 -> 4193 bytes
-rw-r--r--doc/netwatch-notify.d/notification-01-down.svg34
-rw-r--r--doc/netwatch-notify.d/notification-02-up.avifbin0 -> 4744 bytes
-rw-r--r--doc/netwatch-notify.d/notification-02-up.svg35
-rw-r--r--doc/netwatch-notify.md58
-rw-r--r--doc/ospf-to-leds.md13
-rw-r--r--doc/packages-update.md38
-rw-r--r--doc/ppp-on-up.md13
-rw-r--r--doc/sms-action.md17
-rw-r--r--doc/sms-forward.d/notification.avifbin0 -> 4619 bytes
-rw-r--r--doc/sms-forward.d/notification.svg36
-rw-r--r--doc/sms-forward.md63
-rw-r--r--doc/ssh-keys-import.md35
-rw-r--r--doc/super-mario-theme.md13
-rw-r--r--doc/telegram-chat.d/01-chat-specific.avifbin0 -> 38468 bytes
-rw-r--r--doc/telegram-chat.d/02-chat-all.avifbin0 -> 54713 bytes
-rw-r--r--doc/telegram-chat.d/03-reply.avifbin0 -> 50126 bytes
-rw-r--r--doc/telegram-chat.md152
-rw-r--r--doc/unattended-lte-firmware-upgrade.md14
-rw-r--r--doc/update-gre-address.md13
-rw-r--r--doc/update-tunnelbroker.md20
96 files changed, 1529 insertions, 960 deletions
diff --git a/doc/accesslist-duplicates.md b/doc/accesslist-duplicates.md
index 50720b1..a1f9198 100644
--- a/doc/accesslist-duplicates.md
+++ b/doc/accesslist-duplicates.md
@@ -1,7 +1,14 @@
Find and remove access list duplicates
======================================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -15,14 +22,19 @@ entries in wireless access list.
Requirements and installation
-----------------------------
-Depending on whether you use CAPsMAN (`/caps-man`) or local wireless
-interface (`/interface/wireless`) you need to install a different script.
+Depending on whether you use `wifi` package (`/interface/wifi`), legacy
+wifi with CAPsMAN (`/caps-man`) or local wireless interface
+(`/interface/wireless`) you need to install a different script.
+
+For `wifi`:
+
+ $ScriptInstallUpdate accesslist-duplicates.wifi;
-For CAPsMAN:
+For legacy CAPsMAN:
$ScriptInstallUpdate accesslist-duplicates.capsman;
-For local interface:
+For legacy local interface:
$ScriptInstallUpdate accesslist-duplicates.local;
@@ -31,7 +43,7 @@ Usage and invocation
Run this script from a terminal:
- /system/script/run accesslist-duplicates.local;
+ /system/script/run accesslist-duplicates.wifi;
![screenshot: example](accesslist-duplicates.d/01-example.avif)
@@ -41,5 +53,5 @@ See also
* [Collect MAC addresses in wireless access list](collect-wireless-mac.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/backup-cloud.d/notification.avif b/doc/backup-cloud.d/notification.avif
new file mode 100644
index 0000000..e533908
--- /dev/null
+++ b/doc/backup-cloud.d/notification.avif
Binary files differ
diff --git a/doc/backup-cloud.d/notification.svg b/doc/backup-cloud.d/notification.svg
deleted file mode 100644
index a0eed63..0000000
--- a/doc/backup-cloud.d/notification.svg
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg id="svg8" width="403.78" height="273.78" version="1.1" viewBox="0 0 106.83 72.437" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
- <metadata id="metadata5">
- <rdf:RDF>
- <cc:Work rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g id="layer1" transform="translate(16.375 11.083)">
- <rect id="rect857" x="-15.875" y="-10.583" width="105.83" height="71.437" rx="1.3229" fill="#e6e6e6" stroke="#6c5d53" stroke-linecap="round" stroke-linejoin="round"/>
- <g id="g884" transform="matrix(.5 0 0 .5 -12.406 -7.1146)" stroke-width="2">
- <path id="path899" d="m23.177 23.177c-2.9635 2.9635-17.991 2.9635-20.955 0-2.9635-2.9635-2.9635-17.991 0-20.955 2.9635-2.9635 17.991-2.9635 20.955 0 2.9635 2.9635 2.9635 17.991 0 20.955z" fill="#fff"/>
- <g id="g871">
- <g id="text837" stroke-width=".52916px" aria-label="#!rsc">
- <path id="path851" d="m7.4832 16.646v-1.0239h-0.54606l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.97511l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.70208v1.0239h0.56556l-0.24378 1.8722h-0.68257v1.0239h0.54606l-0.18527 1.3944h1.2774l0.18527-1.3944h0.97511l-0.18527 1.3944h1.2774l0.18527-1.3944h0.70208v-1.0239h-0.56556l0.24378-1.8722zm-2.2037 1.8722h-0.97511l0.24378-1.8722h0.97511z"/>
- <path id="path853" d="m9.6187 14.179h-1.6382l0.19502 4.271h1.2481zm-0.81909 5.1583c-0.48755 0-0.8776 0.39979-0.8776 0.8776 0 0.48755 0.39004 0.88735 0.8776 0.88735 0.4973 0 0.88735-0.39979 0.88735-0.88735 0-0.4778-0.39004-0.8776-0.88735-0.8776z"/>
- <path id="path855" d="m13.373 15.612c-0.59482 0-1.1019 0.42905-1.3359 1.1506l-0.13652-1.0044h-1.3359v5.1778h1.5407v-2.6035c0.17552-0.77033 0.4388-1.2286 1.0726-1.2286 0.16577 0 0.30228 0.02925 0.46805 0.06826l0.24378-1.4919c-0.17552-0.04875-0.32178-0.06826-0.51681-0.06826z"/>
- <path id="path857" d="m16.181 15.592c-1.3066 0-2.116 0.69233-2.116 1.5797 0 0.79959 0.50706 1.3261 1.5309 1.6187 0.9361 0.26328 1.0921 0.37054 1.0921 0.72158 0 0.31203-0.28278 0.48755-0.75083 0.48755-0.50706 0-0.98486-0.20477-1.3749-0.50706l-0.75083 0.83859c0.50706 0.4583 1.2676 0.77033 2.1647 0.77033 1.2871 0 2.3012-0.63382 2.3012-1.7064 0-0.92635-0.57531-1.3554-1.5992-1.6479-0.92635-0.27303-1.0629-0.39004-1.0629-0.66307 0-0.23402 0.20477-0.39004 0.62407-0.39004 0.44855 0 0.8776 0.14627 1.2774 0.39979l0.56556-0.86784c-0.4778-0.39004-1.1506-0.63382-1.9015-0.63382z"/>
- <path id="path859" d="m21.281 15.592c-1.5504 0-2.5353 1.1506-2.5353 2.7986 0 1.6382 0.97511 2.7108 2.5645 2.7108 0.71183 0 1.2676-0.23403 1.7454-0.61432l-0.67282-0.9556c-0.37054 0.23403-0.62407 0.35104-0.99461 0.35104-0.61432 0-1.0239-0.35104-1.0239-1.5017 0-1.1604 0.38029-1.6089 1.0434-1.6089 0.35104 0 0.65332 0.11701 0.98486 0.37054l0.66307-0.9166c-0.4973-0.4193-1.0531-0.63382-1.7747-0.63382z"/>
- </g>
- <g id="g1542" transform="matrix(2 0 0 2 -.41134 3.175)" fill="#676867" fill-rule="evenodd" stroke-width=".26458">
- <path id="path943" d="m4.9596-1.0196c0.40797 2.8312 1.9272 4.5499 5.0239 4.691-2.918 1.1164-5.9253-1.5076-5.0239-4.691"/>
- <path id="path945" d="m3.3407-0.52096c0.034969-0.00777 0.038854 0.015542 0.041445 0.041445 0.098431 1.8054 0.85998 3.1744 1.8689 4.1108 1.0089 0.93639 2.3636 1.6941 4.274 1.6604-3.5772 1.4247-7.337-1.9984-6.1856-5.8126"/>
- </g>
- </g>
- </g>
- <text id="text4811" transform="matrix(.26458 0 0 .26458 -44.95 -6.6039)" x="-248.88142" fill="#000000" font-family="'Fira Mono', 'Roboto Mono', monospace" font-size="12px" letter-spacing="0px" stroke-width="1px" word-spacing="0px" style="font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;line-height:15px;shape-inside:url(#rect4813);white-space:pre" xml:space="preserve"><tspan id="tspan13469" x="180" y="10.85">[MikroTik] 💾☁ Cloud backup
-</tspan><tspan id="tspan13471" x="180" y="26.082813">
-</tspan><tspan id="tspan13473" x="180" y="41.082813">Uploaded backup for MikroTik to cloud.
-</tspan><tspan id="tspan13475" x="180" y="56.082811">
-</tspan><tspan id="tspan13477" x="180" y="71.082811">Hostname: MikroTik
-</tspan><tspan id="tspan13479" x="180" y="86.082811">Board name: CHR
-</tspan><tspan id="tspan13481" x="180" y="101.08281">Architecture: x86_64
-</tspan><tspan id="tspan13483" x="180" y="116.08281">RouterOS:
-</tspan><tspan id="tspan13485" x="180" y="131.08281"> Channel: stable
-</tspan><tspan id="tspan13487" x="180" y="146.08282"> Installed: 7.4.1
-</tspan><tspan id="tspan13489" x="180" y="161.08282">RouterOS-Scripts:
-</tspan><tspan id="tspan13491" x="180" y="176.08282"> Version: 83
-</tspan><tspan id="tspan13493" x="180" y="191.08282">
-</tspan><tspan id="tspan13495" x="180" y="206.08282">Name: cloud-20220224-092419
-</tspan><tspan id="tspan13497" x="180" y="221.08282">Size: 370767 B (362 KiB)
-</tspan><tspan id="tspan13499" x="180" y="236.08282">Download key: LLDBfPcWXxmSetWilqeJX5V</tspan></text>
- </g>
-</svg>
diff --git a/doc/backup-cloud.md b/doc/backup-cloud.md
index 130e3f6..be6e06d 100644
--- a/doc/backup-cloud.md
+++ b/doc/backup-cloud.md
@@ -1,7 +1,14 @@
Upload backup to Mikrotik cloud
===============================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -12,14 +19,14 @@ Description
This script uploads
[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 not handle.
-> This may result in script termination (where no notification is sent) or
-> malfunction of fetch command (where all up- and downloads break) for some
-> time. Failed notifications are queued then.
+> ⚠️ **Warning**: The used command can hit errors that a script can with
+> workaround only. A notification *should* be sent anyway. But it can result
+> in malfunction of fetch command (where all up- and downloads break) for
+> some time. Failed notifications are queued then.
### Sample notification
-![backup-cloud notification](backup-cloud.d/notification.svg)
+![backup-cloud notification](backup-cloud.d/notification.avif)
Requirements and installation
-----------------------------
@@ -36,9 +43,14 @@ The configuration goes to `global-config-overlay`, these are the parameters:
* `BackupPassword`: password to encrypt the backup with
* `BackupRandomDelay`: delay up to amount of seconds when run from scheduler
+> ℹ️ **Info**: Copy relevant configuration from
+> [`global-config`](../global-config.rsc) (the one without `-overlay`) to
+> your local `global-config-overlay` and modify it to your specific needs.
+
Also notification settings are required for
[e-mail](mod/notification-email.md),
-[matrix](mod/notification-matrix.md) and/or
+[matrix](mod/notification-matrix.md),
+[ntfy](mod/notification-ntfy.md) and/or
[telegram](mod/notification-telegram.md).
Usage and invocation
@@ -60,5 +72,5 @@ See also
* [Upload backup to server](backup-upload.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/backup-email.md b/doc/backup-email.md
index ab2b9b5..a506543 100644
--- a/doc/backup-email.md
+++ b/doc/backup-email.md
@@ -1,7 +1,14 @@
Send backup via e-mail
======================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -29,9 +36,14 @@ The configuration goes to `global-config-overlay`, these are the parameters:
* `BackupSendBinary`: whether to send binary backup
* `BackupSendExport`: whether to send configuration export
+* `BackupSendGlobalConfig`: whether to send `global-config-overlay`
* `BackupPassword`: password to encrypt the backup with
* `BackupRandomDelay`: delay up to amount of seconds when run from scheduler
+> ℹ️ **Info**: Copy relevant configuration from
+> [`global-config`](../global-config.rsc) (the one without `-overlay`) to
+> your local `global-config-overlay` and modify it to your specific needs.
+
Usage and invocation
--------------------
@@ -52,5 +64,5 @@ See also
* [Upload backup to server](backup-upload.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/backup-partition.md b/doc/backup-partition.md
index b502330..ba20657 100644
--- a/doc/backup-partition.md
+++ b/doc/backup-partition.md
@@ -1,7 +1,14 @@
Save configuration to fallback partition
========================================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -15,6 +22,14 @@ This script saves the current configuration to fallback
For this to work you need a device with sufficient flash storage that is
properly partitioned.
+To make you aware of a possible issue a scheduler logging a warning is
+added in the backup partition's configuration. You may want to use
+[log-forward](log-forward.md) to be notified.
+
+> ⚠️ **Warning**: Only the configuration is saved to backup partition.
+> Every now and then you should copy your installation over for a recent
+> RouterOS version!
+
Requirements and installation
-----------------------------
@@ -39,7 +54,8 @@ See also
* [Upload backup to Mikrotik cloud](backup-cloud.md)
* [Send backup via e-mail](backup-email.md)
* [Upload backup to server](backup-upload.md)
+* [Forward log messages via notification](log-forward.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/backup-upload.d/notification.avif b/doc/backup-upload.d/notification.avif
new file mode 100644
index 0000000..83cfb18
--- /dev/null
+++ b/doc/backup-upload.d/notification.avif
Binary files differ
diff --git a/doc/backup-upload.d/notification.svg b/doc/backup-upload.d/notification.svg
deleted file mode 100644
index 73b34bd..0000000
--- a/doc/backup-upload.d/notification.svg
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg id="svg8" width="443.78" height="263.78" version="1.1" viewBox="0 0 117.42 69.792" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
- <metadata id="metadata5">
- <rdf:RDF>
- <cc:Work rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g id="layer1" transform="translate(16.375 11.083)">
- <rect id="rect857" x="-15.875" y="-10.583" width="116.42" height="68.792" rx="1.4552" fill="#e6e6e6" stroke="#6c5d53" stroke-linecap="round" stroke-linejoin="round"/>
- <g id="g884" transform="matrix(.5 0 0 .5 -12.406 -7.1146)" stroke-width="2">
- <path id="path899" d="m23.177 23.177c-2.9635 2.9635-17.991 2.9635-20.955 0-2.9635-2.9635-2.9635-17.991 0-20.955 2.9635-2.9635 17.991-2.9635 20.955 0 2.9635 2.9635 2.9635 17.991 0 20.955z" fill="#fff"/>
- <g id="g871">
- <g id="text837" stroke-width=".52916px" aria-label="#!rsc">
- <path id="path851" d="m7.4832 16.646v-1.0239h-0.54606l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.97511l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.70208v1.0239h0.56556l-0.24378 1.8722h-0.68257v1.0239h0.54606l-0.18527 1.3944h1.2774l0.18527-1.3944h0.97511l-0.18527 1.3944h1.2774l0.18527-1.3944h0.70208v-1.0239h-0.56556l0.24378-1.8722zm-2.2037 1.8722h-0.97511l0.24378-1.8722h0.97511z"/>
- <path id="path853" d="m9.6187 14.179h-1.6382l0.19502 4.271h1.2481zm-0.81909 5.1583c-0.48755 0-0.8776 0.39979-0.8776 0.8776 0 0.48755 0.39004 0.88735 0.8776 0.88735 0.4973 0 0.88735-0.39979 0.88735-0.88735 0-0.4778-0.39004-0.8776-0.88735-0.8776z"/>
- <path id="path855" d="m13.373 15.612c-0.59482 0-1.1019 0.42905-1.3359 1.1506l-0.13652-1.0044h-1.3359v5.1778h1.5407v-2.6035c0.17552-0.77033 0.4388-1.2286 1.0726-1.2286 0.16577 0 0.30228 0.02925 0.46805 0.06826l0.24378-1.4919c-0.17552-0.04875-0.32178-0.06826-0.51681-0.06826z"/>
- <path id="path857" d="m16.181 15.592c-1.3066 0-2.116 0.69233-2.116 1.5797 0 0.79959 0.50706 1.3261 1.5309 1.6187 0.9361 0.26328 1.0921 0.37054 1.0921 0.72158 0 0.31203-0.28278 0.48755-0.75083 0.48755-0.50706 0-0.98486-0.20477-1.3749-0.50706l-0.75083 0.83859c0.50706 0.4583 1.2676 0.77033 2.1647 0.77033 1.2871 0 2.3012-0.63382 2.3012-1.7064 0-0.92635-0.57531-1.3554-1.5992-1.6479-0.92635-0.27303-1.0629-0.39004-1.0629-0.66307 0-0.23402 0.20477-0.39004 0.62407-0.39004 0.44855 0 0.8776 0.14627 1.2774 0.39979l0.56556-0.86784c-0.4778-0.39004-1.1506-0.63382-1.9015-0.63382z"/>
- <path id="path859" d="m21.281 15.592c-1.5504 0-2.5353 1.1506-2.5353 2.7986 0 1.6382 0.97511 2.7108 2.5645 2.7108 0.71183 0 1.2676-0.23403 1.7454-0.61432l-0.67282-0.9556c-0.37054 0.23403-0.62407 0.35104-0.99461 0.35104-0.61432 0-1.0239-0.35104-1.0239-1.5017 0-1.1604 0.38029-1.6089 1.0434-1.6089 0.35104 0 0.65332 0.11701 0.98486 0.37054l0.66307-0.9166c-0.4973-0.4193-1.0531-0.63382-1.7747-0.63382z"/>
- </g>
- <g id="g1542" transform="matrix(2 0 0 2 -.41134 3.175)" fill="#676867" fill-rule="evenodd" stroke-width=".26458">
- <path id="path943" d="m4.9596-1.0196c0.40797 2.8312 1.9272 4.5499 5.0239 4.691-2.918 1.1164-5.9253-1.5076-5.0239-4.691"/>
- <path id="path945" d="m3.3407-0.52096c0.034969-0.00777 0.038854 0.015542 0.041445 0.041445 0.098431 1.8054 0.85998 3.1744 1.8689 4.1108 1.0089 0.93639 2.3636 1.6941 4.274 1.6604-3.5772 1.4247-7.337-1.9984-6.1856-5.8126"/>
- </g>
- </g>
- </g>
- <text id="text4811" transform="matrix(.26458 0 0 .26458 -44.95 -6.55)" x="-248.88142" fill="#000000" font-family="'Fira Mono', 'Roboto Mono', monospace" font-size="12px" letter-spacing="0px" stroke-width="1px" word-spacing="0px" style="font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;line-height:15px;shape-inside:url(#rect4813);white-space:pre" xml:space="preserve"><tspan id="tspan10771" x="180" y="10.85">[MikroTik] 💾⬆ Backup &amp; Config upload
-</tspan><tspan id="tspan10773" x="180" y="25.85">
-</tspan><tspan id="tspan10775" x="180" y="40.85">Backup and config export upload for MikroTik.
-</tspan><tspan id="tspan10777" x="180" y="55.85">
-</tspan><tspan id="tspan10779" x="180" y="70.85">Hostname: MikroTik
-</tspan><tspan id="tspan10781" x="180" y="85.85">Board name: CHR
-</tspan><tspan id="tspan10783" x="180" y="100.85">Architecture: x86_64
-</tspan><tspan id="tspan10785" x="180" y="115.85">RouterOS:
-</tspan><tspan id="tspan10787" x="180" y="130.85"> Channel: stable
-</tspan><tspan id="tspan10789" x="180" y="145.85"> Installed: 7.4.1
-</tspan><tspan id="tspan10791" x="180" y="160.85">RouterOS-Scripts:
-</tspan><tspan id="tspan10793" x="180" y="175.85"> Version: 83
-</tspan><tspan id="tspan10795" x="180" y="190.85">
-</tspan><tspan id="tspan10797" x="180" y="205.85">Backup file: MikroTik_example_com.backup
-</tspan><tspan id="tspan10799" x="180" y="220.85">Config file: MikroTik_example_com.rsc</tspan></text>
- </g>
-</svg>
diff --git a/doc/backup-upload.md b/doc/backup-upload.md
index 34df1c6..f524adb 100644
--- a/doc/backup-upload.md
+++ b/doc/backup-upload.md
@@ -1,7 +1,14 @@
Upload backup to server
=======================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -19,7 +26,7 @@ configuration export (`/export terse show-sensitive`) to external server.
### Sample notification
-![backup-upload notification](backup-upload.d/notification.svg)
+![backup-upload notification](backup-upload.d/notification.avif)
Requirements and installation
-----------------------------
@@ -35,15 +42,21 @@ The configuration goes to `global-config-overlay`, these are the parameters:
* `BackupSendBinary`: whether to send binary backup
* `BackupSendExport`: whether to send configuration export
+* `BackupSendGlobalConfig`: whether to send `global-config-overlay`
* `BackupPassword`: password to encrypt the backup with
* `BackupRandomDelay`: delay up to amount of seconds when run from scheduler
* `BackupUploadUrl`: url to upload to
* `BackupUploadUser`: username for server authentication
* `BackupUploadPass`: password for server authentication
+> ℹ️ **Info**: Copy relevant configuration from
+> [`global-config`](../global-config.rsc) (the one without `-overlay`) to
+> your local `global-config-overlay` and modify it to your specific needs.
+
Also notification settings are required for
[e-mail](mod/notification-email.md),
-[matrix](mod/notification-matrix.md) and/or
+[matrix](mod/notification-matrix.md),
+[ntfy](mod/notification-ntfy.md) and/or
[telegram](mod/notification-telegram.md).
### Issues with SFTP client
@@ -75,5 +88,5 @@ See also
* [Save configuration to fallback partition](doc/backup-partition.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/capsman-download-packages.md b/doc/capsman-download-packages.md
index 0fdd6cb..c68900e 100644
--- a/doc/capsman-download-packages.md
+++ b/doc/capsman-download-packages.md
@@ -1,7 +1,14 @@
Download packages for CAP upgrade from CAPsMAN
=============================================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -18,24 +25,47 @@ This script automatically downloads these packages.
Requirements and installation
-----------------------------
-Just install the script on CAPsMAN device:
+Make sure you have the `package-path` set in your CAPsMAN configuration,
+as that is where packages are downloaded to and where the system expects
+them.
+
+Then just install the script on CAPsMAN device.
+Depending on whether you use `wifi` package (`/interface/wifi`) or legacy
+wifi with CAPsMAN (`/caps-man`) you need to install a different script.
+
+For `wifi`:
+
+ $ScriptInstallUpdate capsman-download-packages.wifi;
+
+For legacy CAPsMAN:
- $ScriptInstallUpdate capsman-download-packages;
+ $ScriptInstallUpdate capsman-download-packages.capsman;
-Optionally add a scheduler to run after startup:
+Optionally add a scheduler to run after startup. For `wifi`:
- /system/scheduler/add name=capsman-download-packages on-event="/system/script/run capsman-download-packages;" start-time=startup;
+ /system/scheduler/add name=capsman-download-packages on-event="/system/script/run capsman-download-packages.wifi;" start-time=startup;
+
+For legacy CAPsMAN:
+
+ /system/scheduler/add name=capsman-download-packages on-event="/system/script/run capsman-download-packages.capsman;" start-time=startup;
Packages available in local storage in older version are downloaded
-unconditionally. The script tries to download missing packages by guessing
-from system log.
+unconditionally.
+
+If no packages are found the script downloads a default set of packages:
+
+ * `wifi`: `routeros` and `wifi-qcom` for *arm* and *arm64*, `wifi-qcom-ac` for *arm*
+ * legacy CAPsMAN: `routeros` and `wireless` for *arm* and *mipsbe*
+
+> ℹ️ **Info**: If you have packages in the directory and things go wrong for
+> what ever unknown reason: Remove **all** packages and start over.
Usage and invocation
--------------------
Run the script manually:
- /system/script/run capsman-download-packages;
+ /system/script/run capsman-download-packages.wifi;
... or from scheduler.
@@ -49,5 +79,5 @@ See also
* [Run rolling CAP upgrades from CAPsMAN](capsman-rolling-upgrade.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/capsman-rolling-upgrade.md b/doc/capsman-rolling-upgrade.md
index 94a2a79..27d855f 100644
--- a/doc/capsman-rolling-upgrade.md
+++ b/doc/capsman-rolling-upgrade.md
@@ -1,7 +1,14 @@
Run rolling CAP upgrades from CAPsMAN
=====================================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -20,9 +27,17 @@ parallel.
Requirements and installation
-----------------------------
-Just install the script:
+Just install the script on CAPsMAN device.
+Depending on whether you use `wifi` package (`/interface/wifi`) or legacy
+wifi with CAPsMAN (`/caps-man`) you need to install a different script.
+
+For `wifi`:
+
+ $ScriptInstallUpdate capsman-rolling-upgrade.wifi;
+
+For legacy CAPsMAN:
- $ScriptInstallUpdate capsman-rolling-upgrade;
+ $ScriptInstallUpdate capsman-rolling-upgrade.capsman;
Usage and invocation
--------------------
@@ -33,7 +48,7 @@ that script when required.
Alternatively run it manually:
- /system/script/run capsman-rolling-upgrade;
+ /system/script/run capsman-rolling-upgrade.wifi;
See also
--------
@@ -41,5 +56,5 @@ See also
* [Download packages for CAP upgrade from CAPsMAN](capsman-download-packages.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/certificate-renew-issued.md b/doc/certificate-renew-issued.md
index d8201a7..91a1914 100644
--- a/doc/certificate-renew-issued.md
+++ b/doc/certificate-renew-issued.md
@@ -1,7 +1,14 @@
Renew locally issued certificates
=================================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -28,6 +35,10 @@ parameter:
* `CertRenewPass`: an array holding individual passphrases for certificates
+> ℹ️ **Info**: Copy relevant configuration from
+> [`global-config`](../global-config.rsc) (the one without `-overlay`) to
+> your local `global-config-overlay` and modify it to your specific needs.
+
Usage and invocation
--------------------
@@ -46,5 +57,5 @@ See also
* [Renew certificates and notify on expiration](check-certificates.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/check-certificates.d/notification.avif b/doc/check-certificates.d/notification.avif
new file mode 100644
index 0000000..7c250da
--- /dev/null
+++ b/doc/check-certificates.d/notification.avif
Binary files differ
diff --git a/doc/check-certificates.d/notification.svg b/doc/check-certificates.d/notification.svg
deleted file mode 100644
index e1d8baa..0000000
--- a/doc/check-certificates.d/notification.svg
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg id="svg8" width="683.78" height="203.78" version="1.1" viewBox="0 0 180.92 53.917" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
- <metadata id="metadata5">
- <rdf:RDF>
- <cc:Work rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g id="layer1" transform="translate(16.375 11.083)">
- <rect id="rect857" x="-15.875" y="-10.583" width="179.92" height="52.917" rx="2.249" fill="#e6e6e6" stroke="#6c5d53" stroke-linecap="round" stroke-linejoin="round"/>
- <g id="g884" transform="matrix(.5 0 0 .5 -12.406 -7.1146)" stroke-width="2">
- <path id="path899" d="m23.177 23.177c-2.9635 2.9635-17.991 2.9635-20.955 0-2.9635-2.9635-2.9635-17.991 0-20.955 2.9635-2.9635 17.991-2.9635 20.955 0 2.9635 2.9635 2.9635 17.991 0 20.955z" fill="#fff"/>
- <g id="g871">
- <g id="text837" stroke-width=".52916px" aria-label="#!rsc">
- <path id="path851" d="m7.4832 16.646v-1.0239h-0.54606l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.97511l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.70208v1.0239h0.56556l-0.24378 1.8722h-0.68257v1.0239h0.54606l-0.18527 1.3944h1.2774l0.18527-1.3944h0.97511l-0.18527 1.3944h1.2774l0.18527-1.3944h0.70208v-1.0239h-0.56556l0.24378-1.8722zm-2.2037 1.8722h-0.97511l0.24378-1.8722h0.97511z"/>
- <path id="path853" d="m9.6187 14.179h-1.6382l0.19502 4.271h1.2481zm-0.81909 5.1583c-0.48755 0-0.8776 0.39979-0.8776 0.8776 0 0.48755 0.39004 0.88735 0.8776 0.88735 0.4973 0 0.88735-0.39979 0.88735-0.88735 0-0.4778-0.39004-0.8776-0.88735-0.8776z"/>
- <path id="path855" d="m13.373 15.612c-0.59482 0-1.1019 0.42905-1.3359 1.1506l-0.13652-1.0044h-1.3359v5.1778h1.5407v-2.6035c0.17552-0.77033 0.4388-1.2286 1.0726-1.2286 0.16577 0 0.30228 0.02925 0.46805 0.06826l0.24378-1.4919c-0.17552-0.04875-0.32178-0.06826-0.51681-0.06826z"/>
- <path id="path857" d="m16.181 15.592c-1.3066 0-2.116 0.69233-2.116 1.5797 0 0.79959 0.50706 1.3261 1.5309 1.6187 0.9361 0.26328 1.0921 0.37054 1.0921 0.72158 0 0.31203-0.28278 0.48755-0.75083 0.48755-0.50706 0-0.98486-0.20477-1.3749-0.50706l-0.75083 0.83859c0.50706 0.4583 1.2676 0.77033 2.1647 0.77033 1.2871 0 2.3012-0.63382 2.3012-1.7064 0-0.92635-0.57531-1.3554-1.5992-1.6479-0.92635-0.27303-1.0629-0.39004-1.0629-0.66307 0-0.23402 0.20477-0.39004 0.62407-0.39004 0.44855 0 0.8776 0.14627 1.2774 0.39979l0.56556-0.86784c-0.4778-0.39004-1.1506-0.63382-1.9015-0.63382z"/>
- <path id="path859" d="m21.281 15.592c-1.5504 0-2.5353 1.1506-2.5353 2.7986 0 1.6382 0.97511 2.7108 2.5645 2.7108 0.71183 0 1.2676-0.23403 1.7454-0.61432l-0.67282-0.9556c-0.37054 0.23403-0.62407 0.35104-0.99461 0.35104-0.61432 0-1.0239-0.35104-1.0239-1.5017 0-1.1604 0.38029-1.6089 1.0434-1.6089 0.35104 0 0.65332 0.11701 0.98486 0.37054l0.66307-0.9166c-0.4973-0.4193-1.0531-0.63382-1.7747-0.63382z"/>
- </g>
- <g id="g1542" transform="matrix(2 0 0 2 -.41134 3.175)" fill="#676867" fill-rule="evenodd" stroke-width=".26458">
- <path id="path943" d="m4.9596-1.0196c0.40797 2.8312 1.9272 4.5499 5.0239 4.691-2.918 1.1164-5.9253-1.5076-5.0239-4.691"/>
- <path id="path945" d="m3.3407-0.52096c0.034969-0.00777 0.038854 0.015542 0.041445 0.041445 0.098431 1.8054 0.85998 3.1744 1.8689 4.1108 1.0089 0.93639 2.3636 1.6941 4.274 1.6604-3.5772 1.4247-7.337-1.9984-6.1856-5.8126"/>
- </g>
- </g>
- </g>
- <text id="text4811" transform="matrix(.26458 0 0 .26458 -45.014 -6.6039)" x="-248.88142" fill="#000000" font-family="'Fira Mono', 'Roboto Mono', monospace" font-size="12px" letter-spacing="0px" stroke-width="1px" word-spacing="0px" style="font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;line-height:15px;shape-inside:url(#rect4813);white-space:pre" xml:space="preserve"><tspan id="tspan2179" x="180" y="10.85">[MikroTik] 🔏 Certificate renewed
-</tspan><tspan id="tspan2181" x="180" y="25.85">
-</tspan><tspan id="tspan2183" x="180" y="40.85">A certificate on MikroTik has been renewed.
-</tspan><tspan id="tspan2185" x="180" y="55.85">
-</tspan><tspan id="tspan2187" x="180" y="70.85">Name: example.com
-</tspan><tspan id="tspan2189" x="180" y="85.85">CommonName: example.com
-</tspan><tspan id="tspan2191" x="180" y="100.85">Private key: available
-</tspan><tspan id="tspan2193" x="180" y="115.85">Fingerprint: cc54cdd01fcd7698ecb71213874be776906eb33d26cd57754d168632f14c4c8b
-</tspan><tspan id="tspan2195" x="180" y="130.85">Issuer: R3
-</tspan><tspan id="tspan2197" x="180" y="145.85">Validity: may/22/2021 22:29:34 to aug/20/2021 22:29:34
-</tspan><tspan id="tspan2199" x="180" y="160.85">Expires in: 11w 5d 08:18:06</tspan></text>
- </g>
-</svg>
diff --git a/doc/check-certificates.md b/doc/check-certificates.md
index 5198e52..636f719 100644
--- a/doc/check-certificates.md
+++ b/doc/check-certificates.md
@@ -1,7 +1,14 @@
Renew certificates and notify on expiration
===========================================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -14,7 +21,7 @@ certificates that are still about to expire.
### Sample notification
-![check-certificates notification](check-certificates.d/notification.svg)
+![check-certificates notification](check-certificates.d/notification.avif)
Requirements and installation
-----------------------------
@@ -30,14 +37,22 @@ For automatic download and renewal of certificates you need configuration
in `global-config-overlay`, these are the parameters:
* `CertRenewPass`: an array of passphrases to try
+* `CertRenewTime`: on what remaining time to try a renew
* `CertRenewUrl`: the url to download certificates from
+* `CertWarnTime`: on what remaining time to warn via notification
+
+> ℹ️ **Info**: Copy relevant configuration from
+> [`global-config`](../global-config.rsc) (the one without `-overlay`) to
+> your local `global-config-overlay` and modify it to your specific needs.
-Certificates on the web server should be named `CN.pem` (`PEM` format) or
-`CN.p12` (`PKCS#12` format).
+Certificates on the web server should be named by their common name, like
+`CN.pem` (`PEM` format) or`CN.p12` (`PKCS#12` format). Alternatively any
+subject alternative name (aka *Subject Alt Name* or *SAN*) can be used.
Also notification settings are required for
[e-mail](mod/notification-email.md),
-[matrix](mod/notification-matrix.md) and/or
+[matrix](mod/notification-matrix.md),
+[ntfy](mod/notification-ntfy.md) and/or
[telegram](mod/notification-telegram.md).
Usage and invocation
@@ -51,9 +66,26 @@ Just run the script:
/system/scheduler/add interval=1d name=check-certificates on-event="/system/script/run check-certificates;" start-time=startup;
-Alternatively running on startup may be desired:
- /system/scheduler/add name=check-certificates-startup on-event="/system/script/run check-certificates;" start-time=startup;
+Tips & Tricks
+-------------
+
+### Schedule at startup
+
+The script checks for full connectivity before acting, so scheduling at
+startup is perfectly valid:
+
+ /system/scheduler/add name=check-certificates@startup on-event="/system/script/run check-certificates;" start-time=startup;
+
+### Initial import
+
+Given you have a certificate on you server, you can use `check-certificates`
+for the initial import. Just create a *dummy* certificate with short lifetime
+that matches criteria to be renewed:
+
+ /certificate/add name=example.com common-name=example.com days-valid=1;
+ /certificate/sign example.com;
+ /system/script/run check-certificates;
See also
--------
@@ -61,5 +93,5 @@ See also
* [Renew locally issued certificates](certificate-renew-issued.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/check-health.d/notification-01-cpu-utilization-high.avif b/doc/check-health.d/notification-01-cpu-utilization-high.avif
new file mode 100644
index 0000000..326e7fe
--- /dev/null
+++ b/doc/check-health.d/notification-01-cpu-utilization-high.avif
Binary files differ
diff --git a/doc/check-health.d/notification-01-voltage.svg b/doc/check-health.d/notification-01-voltage.svg
deleted file mode 100644
index 4c9caad..0000000
--- a/doc/check-health.d/notification-01-voltage.svg
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg id="svg8" width="443.78" height="123.78" version="1.1" viewBox="0 0 117.42 32.75" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
- <metadata id="metadata5">
- <rdf:RDF>
- <cc:Work rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g id="layer1" transform="translate(16.375 11.083)">
- <rect id="rect857" x="-15.875" y="-10.583" width="116.42" height="31.75" rx="1.4552" fill="#e6e6e6" stroke="#6c5d53" stroke-linecap="round" stroke-linejoin="round"/>
- <g id="g884" transform="matrix(.5 0 0 .5 -12.406 -7.1146)" stroke-width="2">
- <path id="path899" d="m23.177 23.177c-2.9635 2.9635-17.991 2.9635-20.955 0-2.9635-2.9635-2.9635-17.991 0-20.955 2.9635-2.9635 17.991-2.9635 20.955 0 2.9635 2.9635 2.9635 17.991 0 20.955z" fill="#fff"/>
- <g id="g871">
- <g id="text837" stroke-width=".52916px" aria-label="#!rsc">
- <path id="path851" d="m7.4832 16.646v-1.0239h-0.54606l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.97511l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.70208v1.0239h0.56556l-0.24378 1.8722h-0.68257v1.0239h0.54606l-0.18527 1.3944h1.2774l0.18527-1.3944h0.97511l-0.18527 1.3944h1.2774l0.18527-1.3944h0.70208v-1.0239h-0.56556l0.24378-1.8722zm-2.2037 1.8722h-0.97511l0.24378-1.8722h0.97511z"/>
- <path id="path853" d="m9.6187 14.179h-1.6382l0.19502 4.271h1.2481zm-0.81909 5.1583c-0.48755 0-0.8776 0.39979-0.8776 0.8776 0 0.48755 0.39004 0.88735 0.8776 0.88735 0.4973 0 0.88735-0.39979 0.88735-0.88735 0-0.4778-0.39004-0.8776-0.88735-0.8776z"/>
- <path id="path855" d="m13.373 15.612c-0.59482 0-1.1019 0.42905-1.3359 1.1506l-0.13652-1.0044h-1.3359v5.1778h1.5407v-2.6035c0.17552-0.77033 0.4388-1.2286 1.0726-1.2286 0.16577 0 0.30228 0.02925 0.46805 0.06826l0.24378-1.4919c-0.17552-0.04875-0.32178-0.06826-0.51681-0.06826z"/>
- <path id="path857" d="m16.181 15.592c-1.3066 0-2.116 0.69233-2.116 1.5797 0 0.79959 0.50706 1.3261 1.5309 1.6187 0.9361 0.26328 1.0921 0.37054 1.0921 0.72158 0 0.31203-0.28278 0.48755-0.75083 0.48755-0.50706 0-0.98486-0.20477-1.3749-0.50706l-0.75083 0.83859c0.50706 0.4583 1.2676 0.77033 2.1647 0.77033 1.2871 0 2.3012-0.63382 2.3012-1.7064 0-0.92635-0.57531-1.3554-1.5992-1.6479-0.92635-0.27303-1.0629-0.39004-1.0629-0.66307 0-0.23402 0.20477-0.39004 0.62407-0.39004 0.44855 0 0.8776 0.14627 1.2774 0.39979l0.56556-0.86784c-0.4778-0.39004-1.1506-0.63382-1.9015-0.63382z"/>
- <path id="path859" d="m21.281 15.592c-1.5504 0-2.5353 1.1506-2.5353 2.7986 0 1.6382 0.97511 2.7108 2.5645 2.7108 0.71183 0 1.2676-0.23403 1.7454-0.61432l-0.67282-0.9556c-0.37054 0.23403-0.62407 0.35104-0.99461 0.35104-0.61432 0-1.0239-0.35104-1.0239-1.5017 0-1.1604 0.38029-1.6089 1.0434-1.6089 0.35104 0 0.65332 0.11701 0.98486 0.37054l0.66307-0.9166c-0.4973-0.4193-1.0531-0.63382-1.7747-0.63382z"/>
- </g>
- <g id="g1542" transform="matrix(2 0 0 2 -.41134 3.175)" fill="#676867" fill-rule="evenodd" stroke-width=".26458">
- <path id="path943" d="m4.9596-1.0196c0.40797 2.8312 1.9272 4.5499 5.0239 4.691-2.918 1.1164-5.9253-1.5076-5.0239-4.691"/>
- <path id="path945" d="m3.3407-0.52096c0.034969-0.00777 0.038854 0.015542 0.041445 0.041445 0.098431 1.8054 0.85998 3.1744 1.8689 4.1108 1.0089 0.93639 2.3636 1.6941 4.274 1.6604-3.5772 1.4247-7.337-1.9984-6.1856-5.8126"/>
- </g>
- </g>
- </g>
- <text id="text4811" transform="matrix(.26458 0 0 .26458 -45.077 -6.6039)" x="-248.88142" fill="#000000" font-family="'Fira Mono', 'Roboto Mono', monospace" font-size="12px" letter-spacing="0px" stroke-width="1px" word-spacing="0px" style="font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;line-height:15px;shape-inside:url(#rect4813);white-space:pre" xml:space="preserve"><tspan id="tspan13643" x="180" y="10.85">[MikroTik] ⚡📉 Health warning: voltage
-</tspan><tspan id="tspan13645" x="180" y="25.85">
-</tspan><tspan id="tspan13647" x="180" y="40.85">The voltage on MikroTik jumped more than 10%.
-</tspan><tspan id="tspan13649" x="180" y="55.85">
-</tspan><tspan id="tspan13651" x="180" y="70.85">old value: 16.2V
-</tspan><tspan id="tspan13653" x="180" y="85.85">new value: 12.4V</tspan></text>
- </g>
-</svg>
diff --git a/doc/check-health.d/notification-02-cpu-utilization-ok.avif b/doc/check-health.d/notification-02-cpu-utilization-ok.avif
new file mode 100644
index 0000000..811ccd7
--- /dev/null
+++ b/doc/check-health.d/notification-02-cpu-utilization-ok.avif
Binary files differ
diff --git a/doc/check-health.d/notification-02-temperature-high.svg b/doc/check-health.d/notification-02-temperature-high.svg
deleted file mode 100644
index 0ab9488..0000000
--- a/doc/check-health.d/notification-02-temperature-high.svg
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg id="svg8" width="503.78" height="83.78" version="1.1" viewBox="0 0 133.29 22.167" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
- <metadata id="metadata5">
- <rdf:RDF>
- <cc:Work rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g id="layer1" transform="translate(16.375 11.083)">
- <rect id="rect857" x="-15.875" y="-10.583" width="132.29" height="21.167" rx="1.6536" fill="#e6e6e6" stroke="#6c5d53" stroke-linecap="round" stroke-linejoin="round"/>
- <g id="g884" transform="matrix(.5 0 0 .5 -12.406 -7.1146)" stroke-width="2">
- <path id="path899" d="m23.177 23.177c-2.9635 2.9635-17.991 2.9635-20.955 0-2.9635-2.9635-2.9635-17.991 0-20.955 2.9635-2.9635 17.991-2.9635 20.955 0 2.9635 2.9635 2.9635 17.991 0 20.955z" fill="#fff"/>
- <g id="g871">
- <g id="text837" stroke-width=".52916px" aria-label="#!rsc">
- <path id="path851" d="m7.4832 16.646v-1.0239h-0.54606l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.97511l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.70208v1.0239h0.56556l-0.24378 1.8722h-0.68257v1.0239h0.54606l-0.18527 1.3944h1.2774l0.18527-1.3944h0.97511l-0.18527 1.3944h1.2774l0.18527-1.3944h0.70208v-1.0239h-0.56556l0.24378-1.8722zm-2.2037 1.8722h-0.97511l0.24378-1.8722h0.97511z"/>
- <path id="path853" d="m9.6187 14.179h-1.6382l0.19502 4.271h1.2481zm-0.81909 5.1583c-0.48755 0-0.8776 0.39979-0.8776 0.8776 0 0.48755 0.39004 0.88735 0.8776 0.88735 0.4973 0 0.88735-0.39979 0.88735-0.88735 0-0.4778-0.39004-0.8776-0.88735-0.8776z"/>
- <path id="path855" d="m13.373 15.612c-0.59482 0-1.1019 0.42905-1.3359 1.1506l-0.13652-1.0044h-1.3359v5.1778h1.5407v-2.6035c0.17552-0.77033 0.4388-1.2286 1.0726-1.2286 0.16577 0 0.30228 0.02925 0.46805 0.06826l0.24378-1.4919c-0.17552-0.04875-0.32178-0.06826-0.51681-0.06826z"/>
- <path id="path857" d="m16.181 15.592c-1.3066 0-2.116 0.69233-2.116 1.5797 0 0.79959 0.50706 1.3261 1.5309 1.6187 0.9361 0.26328 1.0921 0.37054 1.0921 0.72158 0 0.31203-0.28278 0.48755-0.75083 0.48755-0.50706 0-0.98486-0.20477-1.3749-0.50706l-0.75083 0.83859c0.50706 0.4583 1.2676 0.77033 2.1647 0.77033 1.2871 0 2.3012-0.63382 2.3012-1.7064 0-0.92635-0.57531-1.3554-1.5992-1.6479-0.92635-0.27303-1.0629-0.39004-1.0629-0.66307 0-0.23402 0.20477-0.39004 0.62407-0.39004 0.44855 0 0.8776 0.14627 1.2774 0.39979l0.56556-0.86784c-0.4778-0.39004-1.1506-0.63382-1.9015-0.63382z"/>
- <path id="path859" d="m21.281 15.592c-1.5504 0-2.5353 1.1506-2.5353 2.7986 0 1.6382 0.97511 2.7108 2.5645 2.7108 0.71183 0 1.2676-0.23403 1.7454-0.61432l-0.67282-0.9556c-0.37054 0.23403-0.62407 0.35104-0.99461 0.35104-0.61432 0-1.0239-0.35104-1.0239-1.5017 0-1.1604 0.38029-1.6089 1.0434-1.6089 0.35104 0 0.65332 0.11701 0.98486 0.37054l0.66307-0.9166c-0.4973-0.4193-1.0531-0.63382-1.7747-0.63382z"/>
- </g>
- <g id="g1542" transform="matrix(2 0 0 2 -.41134 3.175)" fill="#676867" fill-rule="evenodd" stroke-width=".26458">
- <path id="path943" d="m4.9596-1.0196c0.40797 2.8312 1.9272 4.5499 5.0239 4.691-2.918 1.1164-5.9253-1.5076-5.0239-4.691"/>
- <path id="path945" d="m3.3407-0.52096c0.034969-0.00777 0.038854 0.015542 0.041445 0.041445 0.098431 1.8054 0.85998 3.1744 1.8689 4.1108 1.0089 0.93639 2.3636 1.6941 4.274 1.6604-3.5772 1.4247-7.337-1.9984-6.1856-5.8126"/>
- </g>
- </g>
- </g>
- <text id="text4811" transform="matrix(.26458 0 0 .26458 -45.077 -6.6039)" x="-248.88142" fill="#000000" font-family="'Fira Mono', 'Roboto Mono', monospace" font-size="12px" letter-spacing="0px" stroke-width="1px" word-spacing="0px" style="font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;line-height:15px;shape-inside:url(#rect4813);white-space:pre" xml:space="preserve"><tspan id="tspan13709" x="180" y="10.85">[MikroTik] 🔥 Health warning: temperature
-</tspan><tspan id="tspan13711" x="180" y="25.85">
-</tspan><tspan id="tspan13713" x="180" y="40.85">The temperature on MikroTik is above threshold: 51°C</tspan></text>
- </g>
-</svg>
diff --git a/doc/check-health.d/notification-03-ram-utilization-high.avif b/doc/check-health.d/notification-03-ram-utilization-high.avif
new file mode 100644
index 0000000..59155c5
--- /dev/null
+++ b/doc/check-health.d/notification-03-ram-utilization-high.avif
Binary files differ
diff --git a/doc/check-health.d/notification-03-temperature-ok.svg b/doc/check-health.d/notification-03-temperature-ok.svg
deleted file mode 100644
index 180d13f..0000000
--- a/doc/check-health.d/notification-03-temperature-ok.svg
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg id="svg8" width="533.78" height="83.78" version="1.1" viewBox="0 0 141.23 22.167" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
- <metadata id="metadata5">
- <rdf:RDF>
- <cc:Work rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g id="layer1" transform="translate(16.375 11.083)">
- <rect id="rect857" x="-15.875" y="-10.583" width="140.23" height="21.167" rx="1.7529" fill="#e6e6e6" stroke="#6c5d53" stroke-linecap="round" stroke-linejoin="round"/>
- <g id="g884" transform="matrix(.5 0 0 .5 -12.406 -7.1146)" stroke-width="2">
- <path id="path899" d="m23.177 23.177c-2.9635 2.9635-17.991 2.9635-20.955 0-2.9635-2.9635-2.9635-17.991 0-20.955 2.9635-2.9635 17.991-2.9635 20.955 0 2.9635 2.9635 2.9635 17.991 0 20.955z" fill="#fff"/>
- <g id="g871">
- <g id="text837" stroke-width=".52916px" aria-label="#!rsc">
- <path id="path851" d="m7.4832 16.646v-1.0239h-0.54606l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.97511l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.70208v1.0239h0.56556l-0.24378 1.8722h-0.68257v1.0239h0.54606l-0.18527 1.3944h1.2774l0.18527-1.3944h0.97511l-0.18527 1.3944h1.2774l0.18527-1.3944h0.70208v-1.0239h-0.56556l0.24378-1.8722zm-2.2037 1.8722h-0.97511l0.24378-1.8722h0.97511z"/>
- <path id="path853" d="m9.6187 14.179h-1.6382l0.19502 4.271h1.2481zm-0.81909 5.1583c-0.48755 0-0.8776 0.39979-0.8776 0.8776 0 0.48755 0.39004 0.88735 0.8776 0.88735 0.4973 0 0.88735-0.39979 0.88735-0.88735 0-0.4778-0.39004-0.8776-0.88735-0.8776z"/>
- <path id="path855" d="m13.373 15.612c-0.59482 0-1.1019 0.42905-1.3359 1.1506l-0.13652-1.0044h-1.3359v5.1778h1.5407v-2.6035c0.17552-0.77033 0.4388-1.2286 1.0726-1.2286 0.16577 0 0.30228 0.02925 0.46805 0.06826l0.24378-1.4919c-0.17552-0.04875-0.32178-0.06826-0.51681-0.06826z"/>
- <path id="path857" d="m16.181 15.592c-1.3066 0-2.116 0.69233-2.116 1.5797 0 0.79959 0.50706 1.3261 1.5309 1.6187 0.9361 0.26328 1.0921 0.37054 1.0921 0.72158 0 0.31203-0.28278 0.48755-0.75083 0.48755-0.50706 0-0.98486-0.20477-1.3749-0.50706l-0.75083 0.83859c0.50706 0.4583 1.2676 0.77033 2.1647 0.77033 1.2871 0 2.3012-0.63382 2.3012-1.7064 0-0.92635-0.57531-1.3554-1.5992-1.6479-0.92635-0.27303-1.0629-0.39004-1.0629-0.66307 0-0.23402 0.20477-0.39004 0.62407-0.39004 0.44855 0 0.8776 0.14627 1.2774 0.39979l0.56556-0.86784c-0.4778-0.39004-1.1506-0.63382-1.9015-0.63382z"/>
- <path id="path859" d="m21.281 15.592c-1.5504 0-2.5353 1.1506-2.5353 2.7986 0 1.6382 0.97511 2.7108 2.5645 2.7108 0.71183 0 1.2676-0.23403 1.7454-0.61432l-0.67282-0.9556c-0.37054 0.23403-0.62407 0.35104-0.99461 0.35104-0.61432 0-1.0239-0.35104-1.0239-1.5017 0-1.1604 0.38029-1.6089 1.0434-1.6089 0.35104 0 0.65332 0.11701 0.98486 0.37054l0.66307-0.9166c-0.4973-0.4193-1.0531-0.63382-1.7747-0.63382z"/>
- </g>
- <g id="g1542" transform="matrix(2 0 0 2 -.41134 3.175)" fill="#676867" fill-rule="evenodd" stroke-width=".26458">
- <path id="path943" d="m4.9596-1.0196c0.40797 2.8312 1.9272 4.5499 5.0239 4.691-2.918 1.1164-5.9253-1.5076-5.0239-4.691"/>
- <path id="path945" d="m3.3407-0.52096c0.034969-0.00777 0.038854 0.015542 0.041445 0.041445 0.098431 1.8054 0.85998 3.1744 1.8689 4.1108 1.0089 0.93639 2.3636 1.6941 4.274 1.6604-3.5772 1.4247-7.337-1.9984-6.1856-5.8126"/>
- </g>
- </g>
- </g>
- <text id="text4811" transform="matrix(.26458 0 0 .26458 -45.077 -6.6039)" x="-248.88142" fill="#000000" font-family="'Fira Mono', 'Roboto Mono', monospace" font-size="12px" letter-spacing="0px" stroke-width="1px" word-spacing="0px" style="font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;line-height:15px;shape-inside:url(#rect4813);white-space:pre" xml:space="preserve"><tspan id="tspan13679" x="180" y="10.85">[MikroTik] ✅ Health recovery: temperature
-</tspan><tspan id="tspan13681" x="180" y="25.85">
-</tspan><tspan id="tspan13683" x="180" y="40.85">The temperature on MikroTik dropped below threshold: 48°C</tspan></text>
- </g>
-</svg>
diff --git a/doc/check-health.d/notification-04-psu-fail.svg b/doc/check-health.d/notification-04-psu-fail.svg
deleted file mode 100644
index f7efe4b..0000000
--- a/doc/check-health.d/notification-04-psu-fail.svg
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg id="svg8" width="513.78" height="83.78" version="1.1" viewBox="0 0 135.94 22.167" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
- <metadata id="metadata5">
- <rdf:RDF>
- <cc:Work rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g id="layer1" transform="translate(16.375 11.083)">
- <rect id="rect857" x="-15.875" y="-10.583" width="134.94" height="21.167" rx="1.6867" fill="#e6e6e6" stroke="#6c5d53" stroke-linecap="round" stroke-linejoin="round"/>
- <g id="g884" transform="matrix(.5 0 0 .5 -12.406 -7.1146)" stroke-width="2">
- <path id="path899" d="m23.177 23.177c-2.9635 2.9635-17.991 2.9635-20.955 0-2.9635-2.9635-2.9635-17.991 0-20.955 2.9635-2.9635 17.991-2.9635 20.955 0 2.9635 2.9635 2.9635 17.991 0 20.955z" fill="#fff"/>
- <g id="g871">
- <g id="text837" stroke-width=".52916px" aria-label="#!rsc">
- <path id="path851" d="m7.4832 16.646v-1.0239h-0.54606l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.97511l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.70208v1.0239h0.56556l-0.24378 1.8722h-0.68257v1.0239h0.54606l-0.18527 1.3944h1.2774l0.18527-1.3944h0.97511l-0.18527 1.3944h1.2774l0.18527-1.3944h0.70208v-1.0239h-0.56556l0.24378-1.8722zm-2.2037 1.8722h-0.97511l0.24378-1.8722h0.97511z"/>
- <path id="path853" d="m9.6187 14.179h-1.6382l0.19502 4.271h1.2481zm-0.81909 5.1583c-0.48755 0-0.8776 0.39979-0.8776 0.8776 0 0.48755 0.39004 0.88735 0.8776 0.88735 0.4973 0 0.88735-0.39979 0.88735-0.88735 0-0.4778-0.39004-0.8776-0.88735-0.8776z"/>
- <path id="path855" d="m13.373 15.612c-0.59482 0-1.1019 0.42905-1.3359 1.1506l-0.13652-1.0044h-1.3359v5.1778h1.5407v-2.6035c0.17552-0.77033 0.4388-1.2286 1.0726-1.2286 0.16577 0 0.30228 0.02925 0.46805 0.06826l0.24378-1.4919c-0.17552-0.04875-0.32178-0.06826-0.51681-0.06826z"/>
- <path id="path857" d="m16.181 15.592c-1.3066 0-2.116 0.69233-2.116 1.5797 0 0.79959 0.50706 1.3261 1.5309 1.6187 0.9361 0.26328 1.0921 0.37054 1.0921 0.72158 0 0.31203-0.28278 0.48755-0.75083 0.48755-0.50706 0-0.98486-0.20477-1.3749-0.50706l-0.75083 0.83859c0.50706 0.4583 1.2676 0.77033 2.1647 0.77033 1.2871 0 2.3012-0.63382 2.3012-1.7064 0-0.92635-0.57531-1.3554-1.5992-1.6479-0.92635-0.27303-1.0629-0.39004-1.0629-0.66307 0-0.23402 0.20477-0.39004 0.62407-0.39004 0.44855 0 0.8776 0.14627 1.2774 0.39979l0.56556-0.86784c-0.4778-0.39004-1.1506-0.63382-1.9015-0.63382z"/>
- <path id="path859" d="m21.281 15.592c-1.5504 0-2.5353 1.1506-2.5353 2.7986 0 1.6382 0.97511 2.7108 2.5645 2.7108 0.71183 0 1.2676-0.23403 1.7454-0.61432l-0.67282-0.9556c-0.37054 0.23403-0.62407 0.35104-0.99461 0.35104-0.61432 0-1.0239-0.35104-1.0239-1.5017 0-1.1604 0.38029-1.6089 1.0434-1.6089 0.35104 0 0.65332 0.11701 0.98486 0.37054l0.66307-0.9166c-0.4973-0.4193-1.0531-0.63382-1.7747-0.63382z"/>
- </g>
- <g id="g1542" transform="matrix(2 0 0 2 -.41134 3.175)" fill="#676867" fill-rule="evenodd" stroke-width=".26458">
- <path id="path943" d="m4.9596-1.0196c0.40797 2.8312 1.9272 4.5499 5.0239 4.691-2.918 1.1164-5.9253-1.5076-5.0239-4.691"/>
- <path id="path945" d="m3.3407-0.52096c0.034969-0.00777 0.038854 0.015542 0.041445 0.041445 0.098431 1.8054 0.85998 3.1744 1.8689 4.1108 1.0089 0.93639 2.3636 1.6941 4.274 1.6604-3.5772 1.4247-7.337-1.9984-6.1856-5.8126"/>
- </g>
- </g>
- </g>
- <text id="text4811" transform="matrix(.26458 0 0 .26458 -45.077 -6.6039)" x="-248.88142" fill="#000000" font-family="'Fira Mono', 'Roboto Mono', monospace" font-size="12px" letter-spacing="0px" stroke-width="1px" word-spacing="0px" style="font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;line-height:15px;shape-inside:url(#rect4813);white-space:pre" xml:space="preserve"><tspan id="tspan2171" x="180" y="10.85">[MikroTik] ❌ Health warning: psu1-state
-</tspan><tspan id="tspan2173" x="180" y="25.85">
-</tspan><tspan id="tspan2175" x="180" y="40.85">The power supply unit 'psu1-state' on MikroTik failed!</tspan></text>
- </g>
-</svg>
diff --git a/doc/check-health.d/notification-04-ram-utilization-ok.avif b/doc/check-health.d/notification-04-ram-utilization-ok.avif
new file mode 100644
index 0000000..d995b9a
--- /dev/null
+++ b/doc/check-health.d/notification-04-ram-utilization-ok.avif
Binary files differ
diff --git a/doc/check-health.d/notification-05-psu-ok.svg b/doc/check-health.d/notification-05-psu-ok.svg
deleted file mode 100644
index 0a3f05c..0000000
--- a/doc/check-health.d/notification-05-psu-ok.svg
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg id="svg8" width="533.78" height="83.78" version="1.1" viewBox="0 0 141.23 22.167" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
- <metadata id="metadata5">
- <rdf:RDF>
- <cc:Work rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g id="layer1" transform="translate(16.375 11.083)">
- <rect id="rect857" x="-15.875" y="-10.583" width="140.23" height="21.167" rx="1.7529" fill="#e6e6e6" stroke="#6c5d53" stroke-linecap="round" stroke-linejoin="round"/>
- <g id="g884" transform="matrix(.5 0 0 .5 -12.406 -7.1146)" stroke-width="2">
- <path id="path899" d="m23.177 23.177c-2.9635 2.9635-17.991 2.9635-20.955 0-2.9635-2.9635-2.9635-17.991 0-20.955 2.9635-2.9635 17.991-2.9635 20.955 0 2.9635 2.9635 2.9635 17.991 0 20.955z" fill="#fff"/>
- <g id="g871">
- <g id="text837" stroke-width=".52916px" aria-label="#!rsc">
- <path id="path851" d="m7.4832 16.646v-1.0239h-0.54606l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.97511l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.70208v1.0239h0.56556l-0.24378 1.8722h-0.68257v1.0239h0.54606l-0.18527 1.3944h1.2774l0.18527-1.3944h0.97511l-0.18527 1.3944h1.2774l0.18527-1.3944h0.70208v-1.0239h-0.56556l0.24378-1.8722zm-2.2037 1.8722h-0.97511l0.24378-1.8722h0.97511z"/>
- <path id="path853" d="m9.6187 14.179h-1.6382l0.19502 4.271h1.2481zm-0.81909 5.1583c-0.48755 0-0.8776 0.39979-0.8776 0.8776 0 0.48755 0.39004 0.88735 0.8776 0.88735 0.4973 0 0.88735-0.39979 0.88735-0.88735 0-0.4778-0.39004-0.8776-0.88735-0.8776z"/>
- <path id="path855" d="m13.373 15.612c-0.59482 0-1.1019 0.42905-1.3359 1.1506l-0.13652-1.0044h-1.3359v5.1778h1.5407v-2.6035c0.17552-0.77033 0.4388-1.2286 1.0726-1.2286 0.16577 0 0.30228 0.02925 0.46805 0.06826l0.24378-1.4919c-0.17552-0.04875-0.32178-0.06826-0.51681-0.06826z"/>
- <path id="path857" d="m16.181 15.592c-1.3066 0-2.116 0.69233-2.116 1.5797 0 0.79959 0.50706 1.3261 1.5309 1.6187 0.9361 0.26328 1.0921 0.37054 1.0921 0.72158 0 0.31203-0.28278 0.48755-0.75083 0.48755-0.50706 0-0.98486-0.20477-1.3749-0.50706l-0.75083 0.83859c0.50706 0.4583 1.2676 0.77033 2.1647 0.77033 1.2871 0 2.3012-0.63382 2.3012-1.7064 0-0.92635-0.57531-1.3554-1.5992-1.6479-0.92635-0.27303-1.0629-0.39004-1.0629-0.66307 0-0.23402 0.20477-0.39004 0.62407-0.39004 0.44855 0 0.8776 0.14627 1.2774 0.39979l0.56556-0.86784c-0.4778-0.39004-1.1506-0.63382-1.9015-0.63382z"/>
- <path id="path859" d="m21.281 15.592c-1.5504 0-2.5353 1.1506-2.5353 2.7986 0 1.6382 0.97511 2.7108 2.5645 2.7108 0.71183 0 1.2676-0.23403 1.7454-0.61432l-0.67282-0.9556c-0.37054 0.23403-0.62407 0.35104-0.99461 0.35104-0.61432 0-1.0239-0.35104-1.0239-1.5017 0-1.1604 0.38029-1.6089 1.0434-1.6089 0.35104 0 0.65332 0.11701 0.98486 0.37054l0.66307-0.9166c-0.4973-0.4193-1.0531-0.63382-1.7747-0.63382z"/>
- </g>
- <g id="g1542" transform="matrix(2 0 0 2 -.41134 3.175)" fill="#676867" fill-rule="evenodd" stroke-width=".26458">
- <path id="path943" d="m4.9596-1.0196c0.40797 2.8312 1.9272 4.5499 5.0239 4.691-2.918 1.1164-5.9253-1.5076-5.0239-4.691"/>
- <path id="path945" d="m3.3407-0.52096c0.034969-0.00777 0.038854 0.015542 0.041445 0.041445 0.098431 1.8054 0.85998 3.1744 1.8689 4.1108 1.0089 0.93639 2.3636 1.6941 4.274 1.6604-3.5772 1.4247-7.337-1.9984-6.1856-5.8126"/>
- </g>
- </g>
- </g>
- <text id="text4811" transform="matrix(.26458 0 0 .26458 -45.077 -6.6039)" x="-248.88142" fill="#000000" font-family="'Fira Mono', 'Roboto Mono', monospace" font-size="12px" letter-spacing="0px" stroke-width="1px" word-spacing="0px" style="font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;line-height:15px;shape-inside:url(#rect4813);white-space:pre" xml:space="preserve"><tspan id="tspan13739" x="180" y="10.85">[MikroTik] ✅ Health recovery: psu1-state
-</tspan><tspan id="tspan13741" x="180" y="25.85">
-</tspan><tspan id="tspan13743" x="180" y="40.85">The power supply unit 'psu1-state' on MikroTik recovered!</tspan></text>
- </g>
-</svg>
diff --git a/doc/check-health.d/notification-05-voltage.avif b/doc/check-health.d/notification-05-voltage.avif
new file mode 100644
index 0000000..17a385b
--- /dev/null
+++ b/doc/check-health.d/notification-05-voltage.avif
Binary files differ
diff --git a/doc/check-health.d/notification-06-temperature-high.avif b/doc/check-health.d/notification-06-temperature-high.avif
new file mode 100644
index 0000000..60d3802
--- /dev/null
+++ b/doc/check-health.d/notification-06-temperature-high.avif
Binary files differ
diff --git a/doc/check-health.d/notification-07-temperature-ok.avif b/doc/check-health.d/notification-07-temperature-ok.avif
new file mode 100644
index 0000000..4afed02
--- /dev/null
+++ b/doc/check-health.d/notification-07-temperature-ok.avif
Binary files differ
diff --git a/doc/check-health.d/notification-08-psu-fail.avif b/doc/check-health.d/notification-08-psu-fail.avif
new file mode 100644
index 0000000..ad049ac
--- /dev/null
+++ b/doc/check-health.d/notification-08-psu-fail.avif
Binary files differ
diff --git a/doc/check-health.d/notification-09-psu-ok.avif b/doc/check-health.d/notification-09-psu-ok.avif
new file mode 100644
index 0000000..26f5a74
--- /dev/null
+++ b/doc/check-health.d/notification-09-psu-ok.avif
Binary files differ
diff --git a/doc/check-health.md b/doc/check-health.md
index 9ee16bb..f94a0bf 100644
--- a/doc/check-health.md
+++ b/doc/check-health.md
@@ -1,7 +1,14 @@
Notify about health state
=========================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -12,32 +19,46 @@ Description
This script is run from scheduler periodically, sending notification on
health related events:
-* voltage jumps up or down more than configured threshold or drops below limit
+* high CPU utilization
+* high RAM utilization (low available RAM)
+* voltage jumps up or down more than configured threshold
+* voltage drops below hard lower limit
* power supply failed or recovered
* temperature is above or below threshold
Note that bad initial state will not trigger an event.
-Only sensors available in hardware can be checked. See what your
-hardware supports:
+Monitoring CPU and RAM utilization (available processing and memory
+resources) works on all devices. Other than that only sensors available
+in hardware can be checked. See what your hardware supports:
/system/health/print;
### Sample notifications
+#### CPU utilization
+
+![check-health notification cpu utilization high](check-health.d/notification-01-cpu-utilization-high.avif)
+![check-health notification cpu utilization ok](check-health.d/notification-02-cpu-utilization-ok.avif)
+
+#### RAM utilization (low available RAM)
+
+![check-health notification ram utilization high](check-health.d/notification-03-ram-utilization-high.avif)
+![check-health notification ram utilization ok](check-health.d/notification-04-ram-utilization-ok.avif)
+
#### Voltage
-![check-health notification voltage](check-health.d/notification-01-voltage.svg)
+![check-health notification voltage](check-health.d/notification-05-voltage.avif)
#### Temperature
-![check-health notification](check-health.d/notification-02-temperature-high.svg)
-![check-health notification](check-health.d/notification-03-temperature-ok.svg)
+![check-health notification temperature high](check-health.d/notification-06-temperature-high.avif)
+![check-health notification temperature ok](check-health.d/notification-07-temperature-ok.avif)
#### PSU state
-![check-health notification](check-health.d/notification-04-psu-fail.svg)
-![check-health notification](check-health.d/notification-05-psu-ok.svg)
+![check-health notification psu fail](check-health.d/notification-08-psu-fail.avif)
+![check-health notification psu ok](check-health.d/notification-09-psu-ok.avif)
Requirements and installation
-----------------------------
@@ -45,7 +66,11 @@ Requirements and installation
Just install the script and create a scheduler:
$ScriptInstallUpdate check-health;
- /system/scheduler/add interval=1m name=check-health on-event="/system/script/run check-health;" start-time=startup;
+ /system/scheduler/add interval=53s name=check-health on-event="/system/script/run check-health;" start-time=startup;
+
+> ℹ️ **Info**: Running lots of scripts simultaneously can tamper the
+> precision of cpu utilization, escpecially on devices with limited
+> resources. Thus an unusual interval is used here.
Configuration
-------------
@@ -56,11 +81,16 @@ The configuration goes to `global-config-overlay`, these are the parameters:
* `CheckHealthVoltageLow`: value (in volt*10) giving a hard lower limit
* `CheckHealthVoltagePercent`: percentage value to trigger voltage jumps
+> ℹ️ **Info**: Copy relevant configuration from
+> [`global-config`](../global-config.rsc) (the one without `-overlay`) to
+> your local `global-config-overlay` and modify it to your specific needs.
+
Also notification settings are required for
[e-mail](mod/notification-email.md),
-[matrix](mod/notification-matrix.md) and/or
+[matrix](mod/notification-matrix.md),
+[ntfy](mod/notification-ntfy.md) and/or
[telegram](mod/notification-telegram.md).
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/check-lte-firmware-upgrade.d/notification.avif b/doc/check-lte-firmware-upgrade.d/notification.avif
new file mode 100644
index 0000000..c440da5
--- /dev/null
+++ b/doc/check-lte-firmware-upgrade.d/notification.avif
Binary files differ
diff --git a/doc/check-lte-firmware-upgrade.d/notification.svg b/doc/check-lte-firmware-upgrade.d/notification.svg
deleted file mode 100644
index 5992462..0000000
--- a/doc/check-lte-firmware-upgrade.d/notification.svg
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg id="svg8" width="483.78" height="153.78" version="1.1" viewBox="0 0 128 40.687" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
- <metadata id="metadata5">
- <rdf:RDF>
- <cc:Work rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g id="layer1" transform="translate(16.375 11.083)">
- <rect id="rect857" x="-15.875" y="-10.583" width="127" height="39.687" rx="1.5875" fill="#e6e6e6" stroke="#6c5d53" stroke-linecap="round" stroke-linejoin="round"/>
- <g id="g884" transform="matrix(.5 0 0 .5 -12.406 -7.1146)" stroke-width="2">
- <path id="path899" d="m23.177 23.177c-2.9635 2.9635-17.991 2.9635-20.955 0-2.9635-2.9635-2.9635-17.991 0-20.955 2.9635-2.9635 17.991-2.9635 20.955 0 2.9635 2.9635 2.9635 17.991 0 20.955z" fill="#fff"/>
- <g id="g871">
- <g id="text837" stroke-width=".52916px" aria-label="#!rsc">
- <path id="path851" d="m7.4832 16.646v-1.0239h-0.54606l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.97511l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.70208v1.0239h0.56556l-0.24378 1.8722h-0.68257v1.0239h0.54606l-0.18527 1.3944h1.2774l0.18527-1.3944h0.97511l-0.18527 1.3944h1.2774l0.18527-1.3944h0.70208v-1.0239h-0.56556l0.24378-1.8722zm-2.2037 1.8722h-0.97511l0.24378-1.8722h0.97511z"/>
- <path id="path853" d="m9.6187 14.179h-1.6382l0.19502 4.271h1.2481zm-0.81909 5.1583c-0.48755 0-0.8776 0.39979-0.8776 0.8776 0 0.48755 0.39004 0.88735 0.8776 0.88735 0.4973 0 0.88735-0.39979 0.88735-0.88735 0-0.4778-0.39004-0.8776-0.88735-0.8776z"/>
- <path id="path855" d="m13.373 15.612c-0.59482 0-1.1019 0.42905-1.3359 1.1506l-0.13652-1.0044h-1.3359v5.1778h1.5407v-2.6035c0.17552-0.77033 0.4388-1.2286 1.0726-1.2286 0.16577 0 0.30228 0.02925 0.46805 0.06826l0.24378-1.4919c-0.17552-0.04875-0.32178-0.06826-0.51681-0.06826z"/>
- <path id="path857" d="m16.181 15.592c-1.3066 0-2.116 0.69233-2.116 1.5797 0 0.79959 0.50706 1.3261 1.5309 1.6187 0.9361 0.26328 1.0921 0.37054 1.0921 0.72158 0 0.31203-0.28278 0.48755-0.75083 0.48755-0.50706 0-0.98486-0.20477-1.3749-0.50706l-0.75083 0.83859c0.50706 0.4583 1.2676 0.77033 2.1647 0.77033 1.2871 0 2.3012-0.63382 2.3012-1.7064 0-0.92635-0.57531-1.3554-1.5992-1.6479-0.92635-0.27303-1.0629-0.39004-1.0629-0.66307 0-0.23402 0.20477-0.39004 0.62407-0.39004 0.44855 0 0.8776 0.14627 1.2774 0.39979l0.56556-0.86784c-0.4778-0.39004-1.1506-0.63382-1.9015-0.63382z"/>
- <path id="path859" d="m21.281 15.592c-1.5504 0-2.5353 1.1506-2.5353 2.7986 0 1.6382 0.97511 2.7108 2.5645 2.7108 0.71183 0 1.2676-0.23403 1.7454-0.61432l-0.67282-0.9556c-0.37054 0.23403-0.62407 0.35104-0.99461 0.35104-0.61432 0-1.0239-0.35104-1.0239-1.5017 0-1.1604 0.38029-1.6089 1.0434-1.6089 0.35104 0 0.65332 0.11701 0.98486 0.37054l0.66307-0.9166c-0.4973-0.4193-1.0531-0.63382-1.7747-0.63382z"/>
- </g>
- <g id="g1542" transform="matrix(2 0 0 2 -.41134 3.175)" fill="#676867" fill-rule="evenodd" stroke-width=".26458">
- <path id="path943" d="m4.9596-1.0196c0.40797 2.8312 1.9272 4.5499 5.0239 4.691-2.918 1.1164-5.9253-1.5076-5.0239-4.691"/>
- <path id="path945" d="m3.3407-0.52096c0.034969-0.00777 0.038854 0.015542 0.041445 0.041445 0.098431 1.8054 0.85998 3.1744 1.8689 4.1108 1.0089 0.93639 2.3636 1.6941 4.274 1.6604-3.5772 1.4247-7.337-1.9984-6.1856-5.8126"/>
- </g>
- </g>
- </g>
- <text id="text4811" transform="matrix(.26458 0 0 .26458 -45.014 -6.6039)" x="-248.88142" fill="#000000" font-family="'Fira Mono', 'Roboto Mono', monospace" font-size="12px" letter-spacing="0px" stroke-width="1px" word-spacing="0px" style="font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;line-height:15px;shape-inside:url(#rect4813);white-space:pre" xml:space="preserve"><tspan id="tspan13600" x="180" y="10.85">[MikroTik] ✨ LTE firmware upgrade
-</tspan><tspan id="tspan13602" x="180" y="25.85">
-</tspan><tspan id="tspan13604" x="180" y="40.85">A new firmware version R11e-LTE6_V033 is available
-</tspan><tspan id="tspan13606" x="180" y="55.85">for LTE interface lte on MikroTik.
-</tspan><tspan id="tspan13608" x="180" y="70.85">
-</tspan><tspan id="tspan13610" x="180" y="85.85">Interface: MikroTik R11e-LTE6
-</tspan><tspan id="tspan13612" x="180" y="100.85">Installed: R11e-LTE6_V027
-</tspan><tspan id="tspan13614" x="180" y="115.85">Available: R11e-LTE6_V033</tspan></text>
- </g>
-</svg>
diff --git a/doc/check-lte-firmware-upgrade.md b/doc/check-lte-firmware-upgrade.md
index f3b3bfc..59a62c7 100644
--- a/doc/check-lte-firmware-upgrade.md
+++ b/doc/check-lte-firmware-upgrade.md
@@ -1,7 +1,14 @@
Notify on LTE firmware upgrade
==============================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -19,7 +26,7 @@ upgrades. Currently supported LTE hardware:
### Sample notification
-![check-lte-firmware-upgrade notification](check-lte-firmware-upgrade.d/notification.svg)
+![check-lte-firmware-upgrade notification](check-lte-firmware-upgrade.d/notification.avif)
Requirements and installation
-----------------------------
@@ -47,5 +54,5 @@ See also
* [Install LTE firmware upgrade](unattended-lte-firmware-upgrade.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/check-routeros-update.d/notification.avif b/doc/check-routeros-update.d/notification.avif
new file mode 100644
index 0000000..50317cf
--- /dev/null
+++ b/doc/check-routeros-update.d/notification.avif
Binary files differ
diff --git a/doc/check-routeros-update.d/notification.svg b/doc/check-routeros-update.d/notification.svg
deleted file mode 100644
index d4dbc43..0000000
--- a/doc/check-routeros-update.d/notification.svg
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg id="svg8" width="523.78" height="253.78" version="1.1" viewBox="0 0 138.58 67.146" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
- <metadata id="metadata5">
- <rdf:RDF>
- <cc:Work rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g id="layer1" transform="translate(16.375 11.083)">
- <rect id="rect857" x="-15.875" y="-10.583" width="137.58" height="66.146" rx="1.7198" fill="#e6e6e6" stroke="#6c5d53" stroke-linecap="round" stroke-linejoin="round"/>
- <g id="g884" transform="matrix(.5 0 0 .5 -12.406 -7.1146)" stroke-width="2">
- <path id="path899" d="m23.177 23.177c-2.9635 2.9635-17.991 2.9635-20.955 0-2.9635-2.9635-2.9635-17.991 0-20.955 2.9635-2.9635 17.991-2.9635 20.955 0 2.9635 2.9635 2.9635 17.991 0 20.955z" fill="#fff"/>
- <g id="g871">
- <g id="text837" stroke-width=".52916px" aria-label="#!rsc">
- <path id="path851" d="m7.4832 16.646v-1.0239h-0.54606l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.97511l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.70208v1.0239h0.56556l-0.24378 1.8722h-0.68257v1.0239h0.54606l-0.18527 1.3944h1.2774l0.18527-1.3944h0.97511l-0.18527 1.3944h1.2774l0.18527-1.3944h0.70208v-1.0239h-0.56556l0.24378-1.8722zm-2.2037 1.8722h-0.97511l0.24378-1.8722h0.97511z"/>
- <path id="path853" d="m9.6187 14.179h-1.6382l0.19502 4.271h1.2481zm-0.81909 5.1583c-0.48755 0-0.8776 0.39979-0.8776 0.8776 0 0.48755 0.39004 0.88735 0.8776 0.88735 0.4973 0 0.88735-0.39979 0.88735-0.88735 0-0.4778-0.39004-0.8776-0.88735-0.8776z"/>
- <path id="path855" d="m13.373 15.612c-0.59482 0-1.1019 0.42905-1.3359 1.1506l-0.13652-1.0044h-1.3359v5.1778h1.5407v-2.6035c0.17552-0.77033 0.4388-1.2286 1.0726-1.2286 0.16577 0 0.30228 0.02925 0.46805 0.06826l0.24378-1.4919c-0.17552-0.04875-0.32178-0.06826-0.51681-0.06826z"/>
- <path id="path857" d="m16.181 15.592c-1.3066 0-2.116 0.69233-2.116 1.5797 0 0.79959 0.50706 1.3261 1.5309 1.6187 0.9361 0.26328 1.0921 0.37054 1.0921 0.72158 0 0.31203-0.28278 0.48755-0.75083 0.48755-0.50706 0-0.98486-0.20477-1.3749-0.50706l-0.75083 0.83859c0.50706 0.4583 1.2676 0.77033 2.1647 0.77033 1.2871 0 2.3012-0.63382 2.3012-1.7064 0-0.92635-0.57531-1.3554-1.5992-1.6479-0.92635-0.27303-1.0629-0.39004-1.0629-0.66307 0-0.23402 0.20477-0.39004 0.62407-0.39004 0.44855 0 0.8776 0.14627 1.2774 0.39979l0.56556-0.86784c-0.4778-0.39004-1.1506-0.63382-1.9015-0.63382z"/>
- <path id="path859" d="m21.281 15.592c-1.5504 0-2.5353 1.1506-2.5353 2.7986 0 1.6382 0.97511 2.7108 2.5645 2.7108 0.71183 0 1.2676-0.23403 1.7454-0.61432l-0.67282-0.9556c-0.37054 0.23403-0.62407 0.35104-0.99461 0.35104-0.61432 0-1.0239-0.35104-1.0239-1.5017 0-1.1604 0.38029-1.6089 1.0434-1.6089 0.35104 0 0.65332 0.11701 0.98486 0.37054l0.66307-0.9166c-0.4973-0.4193-1.0531-0.63382-1.7747-0.63382z"/>
- </g>
- <g id="g1542" transform="matrix(2 0 0 2 -.41134 3.175)" fill="#676867" fill-rule="evenodd" stroke-width=".26458">
- <path id="path943" d="m4.9596-1.0196c0.40797 2.8312 1.9272 4.5499 5.0239 4.691-2.918 1.1164-5.9253-1.5076-5.0239-4.691"/>
- <path id="path945" d="m3.3407-0.52096c0.034969-0.00777 0.038854 0.015542 0.041445 0.041445 0.098431 1.8054 0.85998 3.1744 1.8689 4.1108 1.0089 0.93639 2.3636 1.6941 4.274 1.6604-3.5772 1.4247-7.337-1.9984-6.1856-5.8126"/>
- </g>
- </g>
- </g>
- <text id="text4811" transform="matrix(.26458 0 0 .26458 -44.95 -6.6039)" x="-248.88142" fill="#000000" font-family="'Fira Mono', 'Roboto Mono', monospace" font-size="12px" letter-spacing="0px" stroke-width="1px" word-spacing="0px" style="font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;line-height:15px;shape-inside:url(#rect4813);white-space:pre" xml:space="preserve"><tspan id="tspan13541" x="180" y="10.85">[MikroTik] ✨ RouterOS update
-</tspan><tspan id="tspan13543" x="180" y="25.85">
-</tspan><tspan id="tspan13545" x="180" y="40.85">A new RouterOS version 7.4.1 is available for MikroTik.
-</tspan><tspan id="tspan13547" x="180" y="55.85">
-</tspan><tspan id="tspan13549" x="180" y="70.85">Hostname: MikroTik
-</tspan><tspan id="tspan13551" x="180" y="85.85">Board name: CHR
-</tspan><tspan id="tspan13553" x="180" y="100.85">Architecture: x86_64
-</tspan><tspan id="tspan13555" x="180" y="115.85">RouterOS:
-</tspan><tspan id="tspan13557" x="180" y="130.85"> Channel: stable
-</tspan><tspan id="tspan13559" x="180" y="145.85"> Installed: 7.3.1
-</tspan><tspan id="tspan13561" x="180" y="160.85"> Available: 7.4.1
-</tspan><tspan id="tspan13563" x="180" y="175.85">RouterOS-Scripts:
-</tspan><tspan id="tspan13565" x="180" y="190.85"> Version: 83</tspan></text>
- <text id="text6580" transform="translate(-59.247 -209.41)" fill="#000000" font-family="sans-serif" font-size="3.175px" letter-spacing="0px" stroke-width="1px" word-spacing="0px" style="font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;line-height:3.96875px;shape-inside:url(#rect6582);white-space:pre" xml:space="preserve"><tspan id="tspan13567" x="61.890625" y="254.76135">
-</tspan><tspan id="tspan13569" x="61.890625" y="258.7301">🔗 https://mikrotik.com/download/changelogs/stable-release-tree</tspan></text>
- </g>
-</svg>
diff --git a/doc/check-routeros-update.md b/doc/check-routeros-update.md
index edffcbb..f9d485c 100644
--- a/doc/check-routeros-update.md
+++ b/doc/check-routeros-update.md
@@ -1,7 +1,14 @@
Notify on RouterOS update
=========================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -30,7 +37,7 @@ automatically is supported.
### Sample notification
-![check-routeros-update notification](check-routeros-update.d/notification.svg)
+![check-routeros-update notification](check-routeros-update.d/notification.avif)
Requirements and installation
-----------------------------
@@ -46,19 +53,28 @@ And add a scheduler for automatic update notification:
Configuration
-------------
-Configuration is required only if you want to control update process with
-safe versions from a web server. The configuration goes to
-`global-config-overlay`, this is the parameter:
+No extra configuration is required to receive notifications. Several
+mechanisms are availalbe to enable automatic installation of updates.
+The configuration goes to `global-config-overlay`, these are the parameters:
+
+* `SafeUpdateNeighbor`: install updates automatically if at least one other
+ device is seen in neighbor list with new version
+* `SafeUpdateNeighborIdentity`: regular expression to match identity for
+ trusted devices, leave empty to match all
+* `SafeUpdatePatch`: install patch updates (where just last digit changes)
+ automatically
+* `SafeUpdateUrl`: url on webserver to check for safe update, the channel
+ (`long-term`, `stable` or `testing`) is appended
+* `SafeUpdateAll`: install **all** updates automatically
-* `SafeUpdateNeighbor`: install updates automatically if seen in neighbor list
-* `SafeUpdateOnCap`: check for updates even if device is managed by CAPsMAN
-* `SafeUpdatePatch`: install patch updates automatically
-* `SafeUpdateUrl`: url to check for safe update, the channel (`long-term`,
-`stable` or `testing`) is appended
+> ℹ️ **Info**: Copy relevant configuration from
+> [`global-config`](../global-config.rsc) (the one without `-overlay`) to
+> your local `global-config-overlay` and modify it to your specific needs.
Also notification settings are required for
[e-mail](mod/notification-email.md),
-[matrix](mod/notification-matrix.md) and/or
+[matrix](mod/notification-matrix.md),
+[ntfy](mod/notification-ntfy.md) and/or
[telegram](mod/notification-telegram.md).
Usage and invocation
@@ -72,6 +88,14 @@ If an update is found you can install it right away.
Installing script [packages-update](packages-update.md) gives extra options.
+Tips & Tricks
+-------------
+
+The script checks for full connectivity before acting, so scheduling at
+startup is perfectly valid:
+
+ /system/scheduler/add name=check-routeros-update@startup on-event="/system/script/run check-routeros-update;" start-time=startup;
+
See also
--------
@@ -79,5 +103,5 @@ See also
* [Manage system update](packages-update.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/collect-wireless-mac.d/notification.avif b/doc/collect-wireless-mac.d/notification.avif
new file mode 100644
index 0000000..a2833f0
--- /dev/null
+++ b/doc/collect-wireless-mac.d/notification.avif
Binary files differ
diff --git a/doc/collect-wireless-mac.d/notification.svg b/doc/collect-wireless-mac.d/notification.svg
deleted file mode 100644
index aae8cc5..0000000
--- a/doc/collect-wireless-mac.d/notification.svg
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg id="svg8" width="493.78" height="243.78" version="1.1" viewBox="0 0 130.65 64.5" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
- <metadata id="metadata5">
- <rdf:RDF>
- <cc:Work rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g id="layer1" transform="translate(16.375 11.083)">
- <rect id="rect857" x="-15.875" y="-10.583" width="129.65" height="63.5" rx="1.6206" fill="#e6e6e6" stroke="#6c5d53" stroke-linecap="round" stroke-linejoin="round"/>
- <g id="g884" transform="matrix(.5 0 0 .5 -12.406 -7.1146)" stroke-width="2">
- <path id="path899" d="m23.177 23.177c-2.9635 2.9635-17.991 2.9635-20.955 0-2.9635-2.9635-2.9635-17.991 0-20.955 2.9635-2.9635 17.991-2.9635 20.955 0 2.9635 2.9635 2.9635 17.991 0 20.955z" fill="#fff"/>
- <g id="g871">
- <g id="text837" stroke-width=".52916px" aria-label="#!rsc">
- <path id="path851" d="m7.4832 16.646v-1.0239h-0.54606l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.97511l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.70208v1.0239h0.56556l-0.24378 1.8722h-0.68257v1.0239h0.54606l-0.18527 1.3944h1.2774l0.18527-1.3944h0.97511l-0.18527 1.3944h1.2774l0.18527-1.3944h0.70208v-1.0239h-0.56556l0.24378-1.8722zm-2.2037 1.8722h-0.97511l0.24378-1.8722h0.97511z"/>
- <path id="path853" d="m9.6187 14.179h-1.6382l0.19502 4.271h1.2481zm-0.81909 5.1583c-0.48755 0-0.8776 0.39979-0.8776 0.8776 0 0.48755 0.39004 0.88735 0.8776 0.88735 0.4973 0 0.88735-0.39979 0.88735-0.88735 0-0.4778-0.39004-0.8776-0.88735-0.8776z"/>
- <path id="path855" d="m13.373 15.612c-0.59482 0-1.1019 0.42905-1.3359 1.1506l-0.13652-1.0044h-1.3359v5.1778h1.5407v-2.6035c0.17552-0.77033 0.4388-1.2286 1.0726-1.2286 0.16577 0 0.30228 0.02925 0.46805 0.06826l0.24378-1.4919c-0.17552-0.04875-0.32178-0.06826-0.51681-0.06826z"/>
- <path id="path857" d="m16.181 15.592c-1.3066 0-2.116 0.69233-2.116 1.5797 0 0.79959 0.50706 1.3261 1.5309 1.6187 0.9361 0.26328 1.0921 0.37054 1.0921 0.72158 0 0.31203-0.28278 0.48755-0.75083 0.48755-0.50706 0-0.98486-0.20477-1.3749-0.50706l-0.75083 0.83859c0.50706 0.4583 1.2676 0.77033 2.1647 0.77033 1.2871 0 2.3012-0.63382 2.3012-1.7064 0-0.92635-0.57531-1.3554-1.5992-1.6479-0.92635-0.27303-1.0629-0.39004-1.0629-0.66307 0-0.23402 0.20477-0.39004 0.62407-0.39004 0.44855 0 0.8776 0.14627 1.2774 0.39979l0.56556-0.86784c-0.4778-0.39004-1.1506-0.63382-1.9015-0.63382z"/>
- <path id="path859" d="m21.281 15.592c-1.5504 0-2.5353 1.1506-2.5353 2.7986 0 1.6382 0.97511 2.7108 2.5645 2.7108 0.71183 0 1.2676-0.23403 1.7454-0.61432l-0.67282-0.9556c-0.37054 0.23403-0.62407 0.35104-0.99461 0.35104-0.61432 0-1.0239-0.35104-1.0239-1.5017 0-1.1604 0.38029-1.6089 1.0434-1.6089 0.35104 0 0.65332 0.11701 0.98486 0.37054l0.66307-0.9166c-0.4973-0.4193-1.0531-0.63382-1.7747-0.63382z"/>
- </g>
- <g id="g1542" transform="matrix(2 0 0 2 -.41134 3.175)" fill="#676867" fill-rule="evenodd" stroke-width=".26458">
- <path id="path943" d="m4.9596-1.0196c0.40797 2.8312 1.9272 4.5499 5.0239 4.691-2.918 1.1164-5.9253-1.5076-5.0239-4.691"/>
- <path id="path945" d="m3.3407-0.52096c0.034969-0.00777 0.038854 0.015542 0.041445 0.041445 0.098431 1.8054 0.85998 3.1744 1.8689 4.1108 1.0089 0.93639 2.3636 1.6941 4.274 1.6604-3.5772 1.4247-7.337-1.9984-6.1856-5.8126"/>
- </g>
- </g>
- </g>
- <text id="text4811" transform="matrix(.26458 0 0 .26458 -45.014 -6.6039)" x="-248.88142" fill="#000000" font-family="'Fira Mono', 'Roboto Mono', monospace" font-size="12px" letter-spacing="0px" stroke-width="1px" word-spacing="0px" style="font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;line-height:15px;shape-inside:url(#rect4813);white-space:pre" xml:space="preserve"><tspan id="tspan13404" x="180" y="10.85">[MikroTik] 📱 48:F1:7F:D0:E5:4E connected to Wifi
-</tspan><tspan id="tspan13406" x="180" y="25.85">
-</tspan><tspan id="tspan13408" x="180" y="40.85">A device with unknown MAC address connected to Wifi
-</tspan><tspan id="tspan13410" x="180" y="55.85">on MikroTik.
-</tspan><tspan id="tspan13412" x="180" y="70.85">
-</tspan><tspan id="tspan13414" x="180" y="85.85">Controller: MikroTik
-</tspan><tspan id="tspan13416" x="180" y="100.85">Interface: wl5-wifi
-</tspan><tspan id="tspan13418" x="180" y="115.85">SSID: Wifi
-</tspan><tspan id="tspan13420" x="180" y="130.85">MAC: 48:F1:7F:D0:E5:4E
-</tspan><tspan id="tspan13422" x="180" y="145.85">Vendor: Intel Corporate
-</tspan><tspan id="tspan13424" x="180" y="160.85">Hostname: host-523c8e0e
-</tspan><tspan id="tspan13426" x="180" y="175.85">Address: 192.168.20.254
-</tspan><tspan id="tspan13428" x="180" y="190.85">DNS name: host-523c8e0e.dhcp.MikroTik.example.com
-</tspan><tspan id="tspan13430" x="180" y="205.85">Date: jun/15/2021 09:21:56</tspan></text>
- </g>
-</svg>
diff --git a/doc/collect-wireless-mac.md b/doc/collect-wireless-mac.md
index e6ef990..57032d8 100644
--- a/doc/collect-wireless-mac.md
+++ b/doc/collect-wireless-mac.md
@@ -1,7 +1,14 @@
Collect MAC addresses in wireless access list
=============================================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -17,19 +24,24 @@ and modify it to your needs.
### Sample notification
-![collect-wireless-mac notification](collect-wireless-mac.d/notification.svg)
+![collect-wireless-mac notification](collect-wireless-mac.d/notification.avif)
Requirements and installation
-----------------------------
-Depending on whether you use CAPsMAN (`/caps-man`) or local wireless
-interface (`/interface/wireless`) you need to install a different script.
+Depending on whether you use `wifi` package (`/interface/wifi`), legacy
+wifi with CAPsMAN (`/caps-man`) or local wireless interface
+(`/interface/wireless`) you need to install a different script.
+
+For `wifi`:
+
+ $ScriptInstallUpdate collect-wireless-mac.wifi;
-For CAPsMAN:
+For legacy CAPsMAN:
$ScriptInstallUpdate collect-wireless-mac.capsman;
-For local interface:
+For legacy local interface:
$ScriptInstallUpdate collect-wireless-mac.local;
@@ -42,7 +54,8 @@ entries are to be added.
Also notification settings are required for
[e-mail](mod/notification-email.md),
-[matrix](mod/notification-matrix.md) and/or
+[matrix](mod/notification-matrix.md),
+[ntfy](mod/notification-ntfy.md) and/or
[telegram](mod/notification-telegram.md).
Usage and invocation
@@ -60,5 +73,5 @@ See also
* [Run other scripts on DHCP lease](lease-script.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/daily-psk.d/notification.avif b/doc/daily-psk.d/notification.avif
new file mode 100644
index 0000000..dd0b1b6
--- /dev/null
+++ b/doc/daily-psk.d/notification.avif
Binary files differ
diff --git a/doc/daily-psk.d/notification.svg b/doc/daily-psk.d/notification.svg
deleted file mode 100644
index 77cf955..0000000
--- a/doc/daily-psk.d/notification.svg
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg id="svg8" width="443.78" height="213.78" version="1.1" viewBox="0 0 117.42 56.562" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
- <metadata id="metadata5">
- <rdf:RDF>
- <cc:Work rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g id="layer1" transform="translate(16.375 11.083)">
- <rect id="rect857" x="-15.875" y="-10.583" width="116.42" height="55.562" rx="1.4552" fill="#e6e6e6" stroke="#6c5d53" stroke-linecap="round" stroke-linejoin="round"/>
- <g id="g884" transform="matrix(.5 0 0 .5 -12.406 -7.1146)" stroke-width="2">
- <path id="path899" d="m23.177 23.177c-2.9635 2.9635-17.991 2.9635-20.955 0-2.9635-2.9635-2.9635-17.991 0-20.955 2.9635-2.9635 17.991-2.9635 20.955 0 2.9635 2.9635 2.9635 17.991 0 20.955z" fill="#fff"/>
- <g id="g871">
- <g id="text837" stroke-width=".52916px" aria-label="#!rsc">
- <path id="path851" d="m7.4832 16.646v-1.0239h-0.54606l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.97511l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.70208v1.0239h0.56556l-0.24378 1.8722h-0.68257v1.0239h0.54606l-0.18527 1.3944h1.2774l0.18527-1.3944h0.97511l-0.18527 1.3944h1.2774l0.18527-1.3944h0.70208v-1.0239h-0.56556l0.24378-1.8722zm-2.2037 1.8722h-0.97511l0.24378-1.8722h0.97511z"/>
- <path id="path853" d="m9.6187 14.179h-1.6382l0.19502 4.271h1.2481zm-0.81909 5.1583c-0.48755 0-0.8776 0.39979-0.8776 0.8776 0 0.48755 0.39004 0.88735 0.8776 0.88735 0.4973 0 0.88735-0.39979 0.88735-0.88735 0-0.4778-0.39004-0.8776-0.88735-0.8776z"/>
- <path id="path855" d="m13.373 15.612c-0.59482 0-1.1019 0.42905-1.3359 1.1506l-0.13652-1.0044h-1.3359v5.1778h1.5407v-2.6035c0.17552-0.77033 0.4388-1.2286 1.0726-1.2286 0.16577 0 0.30228 0.02925 0.46805 0.06826l0.24378-1.4919c-0.17552-0.04875-0.32178-0.06826-0.51681-0.06826z"/>
- <path id="path857" d="m16.181 15.592c-1.3066 0-2.116 0.69233-2.116 1.5797 0 0.79959 0.50706 1.3261 1.5309 1.6187 0.9361 0.26328 1.0921 0.37054 1.0921 0.72158 0 0.31203-0.28278 0.48755-0.75083 0.48755-0.50706 0-0.98486-0.20477-1.3749-0.50706l-0.75083 0.83859c0.50706 0.4583 1.2676 0.77033 2.1647 0.77033 1.2871 0 2.3012-0.63382 2.3012-1.7064 0-0.92635-0.57531-1.3554-1.5992-1.6479-0.92635-0.27303-1.0629-0.39004-1.0629-0.66307 0-0.23402 0.20477-0.39004 0.62407-0.39004 0.44855 0 0.8776 0.14627 1.2774 0.39979l0.56556-0.86784c-0.4778-0.39004-1.1506-0.63382-1.9015-0.63382z"/>
- <path id="path859" d="m21.281 15.592c-1.5504 0-2.5353 1.1506-2.5353 2.7986 0 1.6382 0.97511 2.7108 2.5645 2.7108 0.71183 0 1.2676-0.23403 1.7454-0.61432l-0.67282-0.9556c-0.37054 0.23403-0.62407 0.35104-0.99461 0.35104-0.61432 0-1.0239-0.35104-1.0239-1.5017 0-1.1604 0.38029-1.6089 1.0434-1.6089 0.35104 0 0.65332 0.11701 0.98486 0.37054l0.66307-0.9166c-0.4973-0.4193-1.0531-0.63382-1.7747-0.63382z"/>
- </g>
- <g id="g1542" transform="matrix(2 0 0 2 -.41134 3.175)" fill="#676867" fill-rule="evenodd" stroke-width=".26458">
- <path id="path943" d="m4.9596-1.0196c0.40797 2.8312 1.9272 4.5499 5.0239 4.691-2.918 1.1164-5.9253-1.5076-5.0239-4.691"/>
- <path id="path945" d="m3.3407-0.52096c0.034969-0.00777 0.038854 0.015542 0.041445 0.041445 0.098431 1.8054 0.85998 3.1744 1.8689 4.1108 1.0089 0.93639 2.3636 1.6941 4.274 1.6604-3.5772 1.4247-7.337-1.9984-6.1856-5.8126"/>
- </g>
- </g>
- </g>
- <text id="text4811" transform="matrix(.26458 0 0 .26458 -45.014 -6.6039)" x="-248.88142" fill="#000000" font-family="'Fira Mono', 'Roboto Mono', monospace" font-size="12px" letter-spacing="0px" stroke-width="1px" word-spacing="0px" style="font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;line-height:15px;shape-inside:url(#rect4813);white-space:pre" xml:space="preserve"><tspan id="tspan13351" x="180" y="10.85">[MikroTik] 📅 daily PSK Guest-Wifi
-</tspan><tspan id="tspan13353" x="180" y="25.85">
-</tspan><tspan id="tspan13355" x="180" y="40.85">This is the daily PSK on MikroTik:
-</tspan><tspan id="tspan13357" x="180" y="55.85">
-</tspan><tspan id="tspan13359" x="180" y="70.85">SSID: Guest-Wifi
-</tspan><tspan id="tspan13361" x="180" y="85.85">PSK: S3cr3tStr1ng
-</tspan><tspan id="tspan13363" x="180" y="100.85">Date: jun/17/2021
-</tspan><tspan id="tspan13365" x="180" y="115.85">
-</tspan><tspan id="tspan13367" x="180" y="130.85">A client device specific rule must not exist!</tspan></text>
- <text id="text8530" x="2.6538308" y="34.683964" fill="#000000" font-family="sans-serif" font-size="3.175px" letter-spacing="0px" stroke-width="1px" word-spacing="0px" style="font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;line-height:2.38125px" xml:space="preserve"><tspan id="tspan25760" x="2.6538308" y="34.683964" style="font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal">🔗 https://www.eworm.de/cgi-bin/cqrlogo-wifi.cgi?</tspan><tspan id="tspan25762" x="2.6538308" y="39.528858" style="font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal">scale=8&amp;level=1&amp;ssid=Guest-Wifi&amp;pass=S3cr3tStr1ng</tspan></text>
- </g>
-</svg>
diff --git a/doc/daily-psk.md b/doc/daily-psk.md
index 62c26ee..3894d52 100644
--- a/doc/daily-psk.md
+++ b/doc/daily-psk.md
@@ -1,7 +1,14 @@
Use wireless network with daily psk
===================================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -14,28 +21,35 @@ passphrase to a pseudo-random string daily.
### Sample notification
-![daily-psk notification](daily-psk.d/notification.svg)
+![daily-psk notification](daily-psk.d/notification.avif)
Requirements and installation
-----------------------------
Just install this script.
-Depending on whether you use CAPsMAN (`/caps-man`) or local wireless
-interface (`/interface/wireless`) you need to install a different script.
+Depending on whether you use `wifi` package (`/interface/wifi`), legacy
+wifi with CAPsMAN (`/caps-man`) or local wireless interface
+(`/interface/wireless`) you need to install a different script and add
+schedulers to run the script:
-For CAPsMAN:
+For `wifi`:
- $ScriptInstallUpdate daily-psk.capsman;
+ $ScriptInstallUpdate daily-psk.wifi;
+ /system/scheduler/add interval=1d name=daily-psk on-event="/system/script/run daily-psk.wifi;" start-time=03:00:00;
+ /system/scheduler/add name=daily-psk@startup on-event="/system/script/run daily-psk.wifi;" start-time=startup;
-For local interface:
+For legacy CAPsMAN:
- $ScriptInstallUpdate daily-psk.local;
+ $ScriptInstallUpdate daily-psk.capsman;
+ /system/scheduler/add interval=1d name=daily-psk on-event="/system/script/run daily-psk.capsman;" start-time=03:00:00;
+ /system/scheduler/add name=daily-psk@startup on-event="/system/script/run daily-psk.capsman;" start-time=startup;
-And add schedulers to run the script:
+For legacy local interface:
- /system/scheduler/add interval=1d name=daily-psk-nightly on-event="/system/script/run daily-psk.local;" start-date=may/23/2018 start-time=03:00:00;
- /system/scheduler/add name=daily-psk-startup on-event="/system/script/run daily-psk.local;" start-time=startup;
+ $ScriptInstallUpdate daily-psk.local;
+ /system/scheduler/add interval=1d name=daily-psk on-event="/system/script/run daily-psk.local;" start-time=03:00:00;
+ /system/scheduler/add name=daily-psk@startup on-event="/system/script/run daily-psk.local;" start-time=startup;
These will update the passphrase on boot and nightly at 3:00.
@@ -47,15 +61,28 @@ The configuration goes to `global-config-overlay`, these are the parameters:
* `DailyPskMatchComment`: pattern to match the wireless access list comment
* `DailyPskSecrets`: an array with pseudo random strings
-Then add an access list entry:
+> ℹ️ **Info**: Copy relevant configuration from
+> [`global-config`](../global-config.rsc) (the one without `-overlay`) to
+> your local `global-config-overlay` and modify it to your specific needs.
+
+Then add an access list entry. For `wifi`:
+
+ /interface/wifi/access-list/add comment="Daily PSK" ssid-regexp="-guest\$" passphrase="ToBeChangedDaily";
+
+For legacy CAPsMAN:
+
+ /caps-man/access-list/add comment="Daily PSK" ssid-regexp="-guest\$" private-passphrase="ToBeChangedDaily";
+
+For legacy local interface:
/interface/wireless/access-list/add comment="Daily PSK" interface=wl-daily private-pre-shared-key="ToBeChangedDaily";
Also notification settings are required for
[e-mail](mod/notification-email.md),
-[matrix](mod/notification-matrix.md) and/or
+[trix](mod/notification-matrix.md),
+[ntfy](mod/notification-ntfy.md) and/or
[telegram](mod/notification-telegram.md).
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/dhcp-lease-comment.md b/doc/dhcp-lease-comment.md
index bb9222e..f95b124 100644
--- a/doc/dhcp-lease-comment.md
+++ b/doc/dhcp-lease-comment.md
@@ -1,7 +1,14 @@
Comment DHCP leases with info from access list
==============================================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -15,14 +22,19 @@ from wireless access list.
Requirements and installation
-----------------------------
-Depending on whether you use CAPsMAN (`/caps-man`) or local wireless
-interface (`/interface/wireless`) you need to install a different script.
+Depending on whether you use `wifi` package (`/interface/wifi`), legacy
+wifi with CAPsMAN (`/caps-man`) or local wireless interface
+(`/interface/wireless`) you need to install a different script.
+
+For `wifi`:
+
+ $ScriptInstallUpdate dhcp-lease-comment.wifi;
-For CAPsMAN:
+For legacy CAPsMAN:
$ScriptInstallUpdate dhcp-lease-comment.capsman;
-For local interface:
+For legacy local interface:
$ScriptInstallUpdate dhcp-lease-comment.local;
@@ -48,5 +60,5 @@ See also
* [Run other scripts on DHCP lease](lease-script.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/dhcp-to-dns.md b/doc/dhcp-to-dns.md
index bde7f12..13d5ef3 100644
--- a/doc/dhcp-to-dns.md
+++ b/doc/dhcp-to-dns.md
@@ -1,7 +1,14 @@
Create DNS records for DHCP leases
==================================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -9,7 +16,9 @@ Create DNS records for DHCP leases
Description
-----------
-This script adds (and removes) dns records based on dhcp server leases.
+This script adds (and updates & removes) dns records based on dhcp server
+leases. An A record based on mac address is created for all bound lease,
+additionally a CNAME record is created from host name if available.
Requirements and installation
-----------------------------
@@ -32,12 +41,44 @@ On first run a disabled static dns record acting as marker (with comment
"`--- dhcp-to-dns above ---`") is added. Move this entry to define where new
entries are to be added.
-The configuration goes to `global-config-overlay`, these are the parameters:
+The configuration goes to dhcp server's network definition. The domain is
+used to form the dns name:
+
+ /ip/dhcp-server/network/add address=10.0.0.0/24 domain=example.com;
+
+A bound lease for mac address `00:11:22:33:44:55` with ip address
+`10.0.0.50` would result in an A record `00-11-22-33-44-55.example.com`
+pointing to the given ip address.
+
+Additional options can be given from comment, to add an extra level in
+dns name or define a different domain.
+
+ /ip/dhcp-server/network/add address=10.0.0.0/24 domain=example.com comment="domain=another-domain.com, name-extra=dhcp";
+
+This example would result in name `00-11-22-33-44-55.dhcp.another-domain.com`
+for the same lease.
+
+If no domain is found in dhcp server's network definition a fallback from
+`global-config-overlay` is used. This is the parameter:
* `Domain`: the domain used for dns records
-* `HostNameInZone`: whether or not to add the dhcp/dns server's hostname
-* `PrefixInZone`: whether or not to add prefix `dhcp`
-* `ServerNameInZone`: whether or not to add DHCP server name
+
+> ℹ️ **Info**: Copy relevant configuration from
+> [`global-config`](../global-config.rsc) (the one without `-overlay`) to
+> your local `global-config-overlay` and modify it to your specific needs.
+
+### Host name from DHCP lease comment
+
+Overwriting the host name from dhcp lease comment is supported, just add
+something like `hostname=new-hostname` in comment, and separate it by comma
+from other information if required:
+
+ /ip/dhcp-server/lease/add address=10.0.0.50 comment="my device, hostname=new-hostname" mac-address=00:11:22:33:44:55 server=dhcp;
+
+Note this information can be configured in wireless access list with
+[dhcp-lease-comment](dhcp-lease-comment.md), though it comes with a delay
+then due to script execution order. Decrease the scheduler interval to
+reduce the effect.
See also
--------
@@ -48,5 +89,5 @@ See also
* [Run other scripts on DHCP lease](lease-script.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/firmware-upgrade-reboot.md b/doc/firmware-upgrade-reboot.md
index 0215ce9..bac17a7 100644
--- a/doc/firmware-upgrade-reboot.md
+++ b/doc/firmware-upgrade-reboot.md
@@ -1,7 +1,14 @@
Automatically upgrade firmware and reboot
=========================================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -32,5 +39,5 @@ See also
* [Manage system update](packages-update.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/fw-addr-lists.md b/doc/fw-addr-lists.md
new file mode 100644
index 0000000..ac34c88
--- /dev/null
+++ b/doc/fw-addr-lists.md
@@ -0,0 +1,132 @@
+Download, import and update firewall address-lists
+==================================================
+
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
+
+> ℹ️ **Info**: This script can not be used on its own but requires the base
+> installation. See [main README](../README.md) for details.
+
+Description
+-----------
+
+This script downloads, imports and updates firewall address-lists. Its main
+purpose is to block attacking ip addresses, spam hosts, command-and-control
+servers and similar malicious entities. The default configuration contains
+lists from [abuse.ch](https://abuse.ch/) and
+[dshield.org](https://dshield.org/), and
+lists from [spamhaus.org](https://spamhaus.org/) are prepared.
+
+The address-lists are updated in place, so after initial import you will not
+see situation when the lists are not populated.
+
+To mitigate man-in-the-middle attacks with altered lists the server's
+certificate is checked.
+
+> ⚠️ **Warning**: The script does not limit the size of a list, but keep in
+> mind that huge lists can exhaust your device's resources (RAM and CPU),
+> and may take a long time to process.
+
+Requirements and installation
+-----------------------------
+
+Just install the script:
+
+ $ScriptInstallUpdate fw-addr-lists;
+
+And add two schedulers, first one for initial import after startup, second
+one for subsequent updates:
+
+ /system/scheduler/add name="fw-addr-lists@startup" start-time=startup on-event="/system/script/run fw-addr-lists;";
+ /system/scheduler/add name="fw-addr-lists" start-time=startup interval=2h on-event="/system/script/run fw-addr-lists;";
+
+> ℹ️ **Info**: Modify the interval to your needs, but it is recommended to
+> use less than half of the configured timeout for expiration.
+
+Configuration
+-------------
+
+The configuration goes to `global-config-overlay`, these are the parameters:
+
+* `FwAddrLists`: a list of firewall address-lists to download and import
+* `FwAddrListTimeOut`: the timeout for expiration without renew
+
+> ℹ️ **Info**: Copy relevant configuration from
+> [`global-config`](../global-config.rsc) (the one without `-overlay`) to
+> your local `global-config-overlay` and modify it to your specific needs.
+
+Naming a certificate for a list makes the script verify the server
+certificate, so you should add that if possible. Some certificates are
+available in my repository and downloaded automatically. Import it manually
+(menu `/certificate/`) if missing.
+
+Create firewall rules to process the packets that are related to addresses
+from address-lists.
+
+### IPv4 rules
+
+This rejects the packets from and to IPv4 addresses listed in
+address-list `block`.
+
+ /ip/firewall/filter/add chain=input src-address-list=block action=reject reject-with=icmp-admin-prohibited;
+ /ip/firewall/filter/add chain=forward src-address-list=block action=reject reject-with=icmp-admin-prohibited;
+ /ip/firewall/filter/add chain=forward dst-address-list=block action=reject reject-with=icmp-admin-prohibited;
+ /ip/firewall/filter/add chain=output dst-address-list=block action=reject reject-with=icmp-admin-prohibited;
+
+You may want to have an address-list to allow specific addresses, as prepared
+with a list `allow`. In fact you can use any list name, just change the
+default ones or add your own - matching in configuration and firewall rules.
+
+ /ip/firewall/filter/add chain=input src-address-list=allow action=accept;
+ /ip/firewall/filter/add chain=forward src-address-list=allow action=accept;
+ /ip/firewall/filter/add chain=forward dst-address-list=allow action=accept;
+ /ip/firewall/filter/add chain=output dst-address-list=allow action=accept;
+
+Modify these for your needs, but **most important**: Move the rules up in
+chains and make sure they actually take effect as expected!
+
+Alternatively handle the packets in firewall's raw section if you prefer:
+
+ /ip/firewall/raw/add chain=prerouting src-address-list=block action=drop;
+ /ip/firewall/raw/add chain=prerouting dst-address-list=block action=drop;
+ /ip/firewall/raw/add chain=output dst-address-list=block action=drop;
+
+> ⚠️ **Warning**: Just again... The order of firewall rules is important. Make
+> sure they actually take effect as expected!
+
+### IPv6 rules
+
+These are the same rules, but for IPv6.
+
+Reject packets in address-list `block`:
+
+ /ipv6/firewall/filter/add chain=input src-address-list=block action=reject reject-with=icmp-admin-prohibited;
+ /ipv6/firewall/filter/add chain=forward src-address-list=block action=reject reject-with=icmp-admin-prohibited;
+ /ipv6/firewall/filter/add chain=forward dst-address-list=block action=reject reject-with=icmp-admin-prohibited;
+ /ipv6/firewall/filter/add chain=output dst-address-list=block action=reject reject-with=icmp-admin-prohibited;
+
+Allow packets in address-list `allow`:
+
+ /ipv6/firewall/filter/add chain=input src-address-list=allow action=accept;
+ /ipv6/firewall/filter/add chain=forward src-address-list=allow action=accept;
+ /ipv6/firewall/filter/add chain=forward dst-address-list=allow action=accept;
+ /ipv6/firewall/filter/add chain=output dst-address-list=allow action=accept;
+
+Drop packets in firewall's raw section:
+
+ /ipv6/firewall/raw/add chain=prerouting src-address-list=block action=drop;
+ /ipv6/firewall/raw/add chain=prerouting dst-address-list=block action=drop;
+ /ipv6/firewall/raw/add chain=output dst-address-list=block action=drop;
+
+> ⚠️ **Warning**: Just again... The order of firewall rules is important. Make
+> sure they actually take effect as expected!
+
+---
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/global-wait.md b/doc/global-wait.md
index ac3e5cc..4b42717 100644
--- a/doc/global-wait.md
+++ b/doc/global-wait.md
@@ -1,7 +1,14 @@
Wait for global functions and modules
=====================================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -36,5 +43,5 @@ See also
* [Manage VLANs on bridge ports](mod/bridge-port-vlan.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/gps-track.md b/doc/gps-track.md
index c7d28f6..7006fb3 100644
--- a/doc/gps-track.md
+++ b/doc/gps-track.md
@@ -1,7 +1,14 @@
Send GPS position to server
===========================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -32,9 +39,13 @@ The configuration goes to `global-config-overlay`, the only parameter is:
* `GpsTrackUrl`: the url to send json data to
+> ℹ️ **Info**: Copy relevant configuration from
+> [`global-config`](../global-config.rsc) (the one without `-overlay`) to
+> your local `global-config-overlay` and modify it to your specific needs.
+
The configured coordinate format (see `/system/gps`) defines the format
sent to the server.
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/hotspot-to-wpa.md b/doc/hotspot-to-wpa.md
index 211d4fb..275fe4d 100644
--- a/doc/hotspot-to-wpa.md
+++ b/doc/hotspot-to-wpa.md
@@ -1,7 +1,14 @@
-Use WPA2 network with hotspot credentials
-=========================================
+Use WPA network with hotspot credentials
+========================================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -10,37 +17,56 @@ Description
-----------
RouterOS supports an unlimited number of MAC address specific passphrases
-for WPA2 encrypted wifi networks via access list. The idea of this script
-is to transfer hotspot credentials to MAC address specific WPA2 passphrase.
+for WPA encrypted wifi networks via access list. The idea of this script
+is to transfer hotspot credentials to MAC address specific WPA passphrase.
Requirements and installation
-----------------------------
-You need a properly configured hotspot on one (open) SSID and a WP2 enabled
+You need a properly configured hotspot on one (open) SSID and a WPA enabled
SSID with suffix "`-wpa`".
-Then install the script:
+Then install the script.
+Depending on whether you use `wifi` package (`/interface/wifi`)or legacy
+wifi with CAPsMAN (`/caps-man`) you need to install a different script and
+set it as `on-login` script in hotspot.
+
+For `wifi`:
- $ScriptInstallUpdate hotspot-to-wpa;
+ $ScriptInstallUpdate hotspot-to-wpa.wifi;
+ /ip/hotspot/user/profile/set on-login="hotspot-to-wpa.wifi" [ find ];
-Configure your hotspot to use this script as `on-login` script:
+For legacy CAPsMAN:
- /ip/hotspot/user/profile/set on-login=hotspot-to-wpa [ find ];
+ $ScriptInstallUpdate hotspot-to-wpa.capsman;
+ /ip/hotspot/user/profile/set on-login="hotspot-to-wpa.capsman" [ find ];
### Automatic cleanup
With just `hotspot-to-wpa` installed the mac addresses will last in the
-access list forever. Install the optional script for automatic cleanup:
+access list forever. Install the optional script for automatic cleanup
+and add a scheduler.
+
+For `wifi`:
+
+ $ScriptInstallUpdate hotspot-to-wpa-cleanup.wifi,lease-script;
+ /system/scheduler/add interval=1d name=hotspot-to-wpa-cleanup on-event="/system/script/run hotspot-to-wpa-cleanup.wifi;" start-time=startup;
- $ScriptInstallUpdate hotspot-to-wpa-cleanup,lease-script;
+For legacy CAPsMAN:
-Create a scheduler:
+ $ScriptInstallUpdate hotspot-to-wpa-cleanup.capsman,lease-script;
+ /system/scheduler/add interval=1d name=hotspot-to-wpa-cleanup on-event="/system/script/run hotspot-to-wpa-cleanup.capsman;" start-time=startup;
- /system/scheduler/add interval=1d name=hotspot-to-wpa-cleanup on-event="/system/script/run hotspot-to-wpa-cleanup;" start-time=startup;
+And add the lease script and matcher comment to your wpa interfaces' dhcp
+server. You can add more information to the comment, separated by comma. In
+this example the server is called `hotspot-to-wpa`.
-And add the lease script to your wpa interfaces' dhcp server:
+ /ip/dhcp-server/set lease-script=lease-script comment="hotspot-to-wpa=wpa" hotspot-to-wpa;
- /ip/dhcp-server/set lease-script=lease-script [ find where name~"wpa" ];
+You can specify the timeout after which a device is removed from leases and
+access-list. The default is four weeks.
+
+ /ip/dhcp-server/set lease-script=lease-script comment="hotspot-to-wpa=wpa, timeout=2w" hotspot-to-wpa;
Configuration
-------------
@@ -54,17 +80,25 @@ Create hotspot login credentials:
/ip/hotspot/user/add comment="Test User 1" name=user1 password=v3ry;
/ip/hotspot/user/add comment="Test User 2" name=user2 password=s3cr3t;
+This also works with authentication via radius, but is limited then:
+Additional information is not available, including the password.
+
Additionally templates can be created to give more options for access list:
* `action`: set to `reject` to ignore logins on that hotspot
-* `private-passphrase`: do **not** use passphrase from hotspot's user
- credentials, but given one - or unset (use default passphrase) with
- special word `ignore`
+* `passphrase` or `private-passphrase`: do **not** use passphrase from
+ hotspot's user credentials, but given one - or unset (use default
+ passphrase) with special word `ignore`
* `ssid-regexp`: set a different SSID regular expression to match
* `vlan-id`: connect device to specific VLAN
* `vlan-mode`: set the VLAN mode for device
-For a hotspot called `example` the template could look like this:
+For a hotspot called `example` the template could look like this.
+For `wifi`:
+
+ /interface/wifi/access-list/add comment="hotspot-to-wpa template example" disabled=yes passphrase="ignore" ssid-regexp="^example\$" vlan-id=10;
+
+For legacy CAPsMAN:
/caps-man/access-list/add comment="hotspot-to-wpa template example" disabled=yes private-passphrase="ignore" ssid-regexp="^example\$" vlan-id=10 vlan-mode=use-tag;
@@ -77,7 +111,7 @@ Usage and invocation
--------------------
Now let the users connect and login to the hotspot. After that the devices
-(identified by MAC address) can connect to the WPA2 network, using the
+(identified by MAC address) can connect to the WPA network, using the
passphrase from hotspot credentials.
See also
@@ -86,5 +120,5 @@ See also
* [Run other scripts on DHCP lease](lease-script.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/ip-addr-bridge.md b/doc/ip-addr-bridge.md
index f0b593e..941a8ae 100644
--- a/doc/ip-addr-bridge.md
+++ b/doc/ip-addr-bridge.md
@@ -1,7 +1,14 @@
Manage IP addresses with bridge status
======================================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
Description
-----------
@@ -28,5 +35,5 @@ Note that IP addresses on bridges without a single port (acting as loopback
interface) are ignored.
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/ipsec-to-dns.md b/doc/ipsec-to-dns.md
index 87ad21a..0a91960 100644
--- a/doc/ipsec-to-dns.md
+++ b/doc/ipsec-to-dns.md
@@ -1,7 +1,14 @@
Create DNS records for IPSec peers
==================================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -36,11 +43,15 @@ The configuration goes to `global-config-overlay`, these are the parameters:
* `HostNameInZone`: whether or not to add the ipsec/dns server's hostname
* `PrefixInZone`: whether or not to add prefix `ipsec`
+> ℹ️ **Info**: Copy relevant configuration from
+> [`global-config`](../global-config.rsc) (the one without `-overlay`) to
+> your local `global-config-overlay` and modify it to your specific needs.
+
See also
--------
* [Create DNS records for DHCP leases](dns-to-dhcp.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/ipv6-update.md b/doc/ipv6-update.md
index 7c5a943..20265fe 100644
--- a/doc/ipv6-update.md
+++ b/doc/ipv6-update.md
@@ -1,7 +1,14 @@
Update configuration on IPv6 prefix change
==========================================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -11,7 +18,7 @@ Description
With changing IPv6 prefix from ISP this script handles to update...
-* ipv6 firewall address-list
+* ipv6 firewall address-list (prefixes (`/64`) and host addresses (`/128`))
* dns records
Requirements and installation
@@ -52,6 +59,11 @@ has to be associated to an interface in comment:
/ipv6/firewall/address-list/add address=2003:cf:2f0f:de01::/64 comment="ipv6-pool-isp, interface=br-local" list=local;
+Updating address list entries with host addresses works as well, the new
+prefix is combinded with given suffix then:
+
+ /ipv6/firewall/address-list/add address=2003:cf:2f0f:de01:e3e0:f8fa:8cd6:dbe1/128 comment="ipv6-pool-isp, interface=br-local" list=hosts;
+
Static DNS records need a special comment to be updated. Again it has to
start with "`ipv6-pool-`" and actual pool name, followed by a comma,
"`interface=`" and the name of interface this address is connected to:
@@ -64,5 +76,5 @@ See also
* [Run scripts on ppp connection](ppp-on-up.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/lease-script.md b/doc/lease-script.md
index a435d43..4d2f3bc 100644
--- a/doc/lease-script.md
+++ b/doc/lease-script.md
@@ -1,7 +1,14 @@
Run other scripts on DHCP lease
===============================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -40,8 +47,8 @@ See also
* [Collect MAC addresses in wireless access list](collect-wireless-mac.md)
* [Comment DHCP leases with info from access list](dhcp-lease-comment.md)
* [Create DNS records for DHCP leases](dhcp-to-dns.md)
-* [Use WPA2 network with hotspot credentials](hotspot-to-wpa.md)
+* [Use WPA network with hotspot credentials](hotspot-to-wpa.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/leds-mode.md b/doc/leds-mode.md
index 65f9f01..90ea418 100644
--- a/doc/leds-mode.md
+++ b/doc/leds-mode.md
@@ -1,7 +1,14 @@
Manage LEDs dark mode
=====================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
Description
-----------
@@ -46,5 +53,5 @@ See also
* [Mode button with multiple presses](mode-button.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/log-forward.d/notification.avif b/doc/log-forward.d/notification.avif
new file mode 100644
index 0000000..a0f9ab3
--- /dev/null
+++ b/doc/log-forward.d/notification.avif
Binary files differ
diff --git a/doc/log-forward.d/notification.svg b/doc/log-forward.d/notification.svg
deleted file mode 100644
index 9527411..0000000
--- a/doc/log-forward.d/notification.svg
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg id="svg8" width="573.78" height="203.78" version="1.1" viewBox="0 0 151.81 53.917" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
- <metadata id="metadata5">
- <rdf:RDF>
- <cc:Work rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g id="layer1" transform="translate(16.375 11.083)">
- <rect id="rect857" x="-15.875" y="-10.583" width="150.81" height="52.917" rx="1.8852" fill="#e6e6e6" stroke="#6c5d53" stroke-linecap="round" stroke-linejoin="round"/>
- <g id="g884" transform="matrix(.5 0 0 .5 -12.406 -7.1146)" stroke-width="2">
- <path id="path899" d="m23.177 23.177c-2.9635 2.9635-17.991 2.9635-20.955 0-2.9635-2.9635-2.9635-17.991 0-20.955 2.9635-2.9635 17.991-2.9635 20.955 0 2.9635 2.9635 2.9635 17.991 0 20.955z" fill="#fff"/>
- <g id="g871">
- <g id="text837" stroke-width=".52916px" aria-label="#!rsc">
- <path id="path851" d="m7.4832 16.646v-1.0239h-0.54606l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.97511l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.70208v1.0239h0.56556l-0.24378 1.8722h-0.68257v1.0239h0.54606l-0.18527 1.3944h1.2774l0.18527-1.3944h0.97511l-0.18527 1.3944h1.2774l0.18527-1.3944h0.70208v-1.0239h-0.56556l0.24378-1.8722zm-2.2037 1.8722h-0.97511l0.24378-1.8722h0.97511z"/>
- <path id="path853" d="m9.6187 14.179h-1.6382l0.19502 4.271h1.2481zm-0.81909 5.1583c-0.48755 0-0.8776 0.39979-0.8776 0.8776 0 0.48755 0.39004 0.88735 0.8776 0.88735 0.4973 0 0.88735-0.39979 0.88735-0.88735 0-0.4778-0.39004-0.8776-0.88735-0.8776z"/>
- <path id="path855" d="m13.373 15.612c-0.59482 0-1.1019 0.42905-1.3359 1.1506l-0.13652-1.0044h-1.3359v5.1778h1.5407v-2.6035c0.17552-0.77033 0.4388-1.2286 1.0726-1.2286 0.16577 0 0.30228 0.02925 0.46805 0.06826l0.24378-1.4919c-0.17552-0.04875-0.32178-0.06826-0.51681-0.06826z"/>
- <path id="path857" d="m16.181 15.592c-1.3066 0-2.116 0.69233-2.116 1.5797 0 0.79959 0.50706 1.3261 1.5309 1.6187 0.9361 0.26328 1.0921 0.37054 1.0921 0.72158 0 0.31203-0.28278 0.48755-0.75083 0.48755-0.50706 0-0.98486-0.20477-1.3749-0.50706l-0.75083 0.83859c0.50706 0.4583 1.2676 0.77033 2.1647 0.77033 1.2871 0 2.3012-0.63382 2.3012-1.7064 0-0.92635-0.57531-1.3554-1.5992-1.6479-0.92635-0.27303-1.0629-0.39004-1.0629-0.66307 0-0.23402 0.20477-0.39004 0.62407-0.39004 0.44855 0 0.8776 0.14627 1.2774 0.39979l0.56556-0.86784c-0.4778-0.39004-1.1506-0.63382-1.9015-0.63382z"/>
- <path id="path859" d="m21.281 15.592c-1.5504 0-2.5353 1.1506-2.5353 2.7986 0 1.6382 0.97511 2.7108 2.5645 2.7108 0.71183 0 1.2676-0.23403 1.7454-0.61432l-0.67282-0.9556c-0.37054 0.23403-0.62407 0.35104-0.99461 0.35104-0.61432 0-1.0239-0.35104-1.0239-1.5017 0-1.1604 0.38029-1.6089 1.0434-1.6089 0.35104 0 0.65332 0.11701 0.98486 0.37054l0.66307-0.9166c-0.4973-0.4193-1.0531-0.63382-1.7747-0.63382z"/>
- </g>
- <g id="g1542" transform="matrix(2 0 0 2 -.41134 3.175)" fill="#676867" fill-rule="evenodd" stroke-width=".26458">
- <path id="path943" d="m4.9596-1.0196c0.40797 2.8312 1.9272 4.5499 5.0239 4.691-2.918 1.1164-5.9253-1.5076-5.0239-4.691"/>
- <path id="path945" d="m3.3407-0.52096c0.034969-0.00777 0.038854 0.015542 0.041445 0.041445 0.098431 1.8054 0.85998 3.1744 1.8689 4.1108 1.0089 0.93639 2.3636 1.6941 4.274 1.6604-3.5772 1.4247-7.337-1.9984-6.1856-5.8126"/>
- </g>
- </g>
- </g>
- <text id="text4811" transform="matrix(.26458 0 0 .26458 -44.95 -6.6039)" x="-248.88142" fill="#000000" font-family="'Fira Mono', 'Roboto Mono', monospace" font-size="12px" letter-spacing="0px" stroke-width="1px" word-spacing="0px" style="font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;line-height:15px;shape-inside:url(#rect4813);white-space:pre" xml:space="preserve"><tspan id="tspan2317" x="180" y="10.85">[MikroTik] ⚠ Log Forwarding
-</tspan><tspan id="tspan2319" x="180" y="26.082813">
-</tspan><tspan id="tspan2321" x="180" y="41.082813">The log on MikroTik contains these 3 messages after 6d23:55:18 </tspan><tspan id="tspan2323" x="180" y="56.082811">uptime.
-</tspan><tspan id="tspan2325" x="180" y="71.082811">
-</tspan><tspan id="tspan2327" x="180" y="86.082811"> ● 13:24:02 script;error backup-cloud: Failed uploading backup </tspan><tspan id="tspan2329" x="180" y="101.08281">for MikroTik to cloud!
-</tspan><tspan id="tspan2331" x="180" y="116.08281"> ● 13:24:17 system;info;account user admin logged in from </tspan><tspan id="tspan2333" x="180" y="131.08281">192.168.88.177 via ssh
-</tspan><tspan id="tspan2335" x="180" y="146.08282"> ● 13:24:57 system;info;account user admin logged out from </tspan><tspan id="tspan2337" x="180" y="161.08282">192.168.88.177 via ssh</tspan></text>
- </g>
-</svg>
diff --git a/doc/log-forward.md b/doc/log-forward.md
index 40a4135..44409dc 100644
--- a/doc/log-forward.md
+++ b/doc/log-forward.md
@@ -1,7 +1,14 @@
Forward log messages via notification
=====================================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -9,20 +16,28 @@ Forward log messages via notification
Description
-----------
-RouterOS supports sending log messages via e-mail or to a syslog server.
-This has some limitation, however:
+RouterOS itself supports sending log messages via e-mail or to a syslog
+server (see `/system/logging`). This has some limitation, however:
* does not work early after boot if network connectivity is not
- yet established
+ yet established, or breaks intermittently
* lots of messages generate a flood of mails
* Matrix and Telegram are not supported
-The script is intended to be run periodically. It collects log messages
-and forwards them via notification.
+The script works around the limitations, for example it does:
+
+* read from `/log`, including messages from early boot
+* skip multi-repeated messages
+* rate-limit itself to mitigate flooding
+* forward via notification (which includes *e-mail*, *Matrix* and *Telegram*
+ when installed and configured, see below)
+
+It is intended to be run periodically from scheduler, then collects new
+log messages and forwards them via notification.
### Sample notification
-![log-forward notification](log-forward.d/notification.svg)
+![log-forward notification](log-forward.d/notification.avif)
Requirements and installation
-----------------------------
@@ -46,11 +61,35 @@ The configuration goes to `global-config-overlay`, these are the parameters:
* `LogForwardIncludeMessage`: define message text to be forwarded (even if
filter matches)
+> ℹ️ **Info**: Copy relevant configuration from
+> [`global-config`](../global-config.rsc) (the one without `-overlay`) to
+> your local `global-config-overlay` and modify it to your specific needs.
+
+These patterns are matched as
+[regular expressions](https://wiki.mikrotik.com/wiki/Manual:Regular_Expressions).
+To forward **all** (ignoring severity) log messages with topics `account`
+(which includes user logins) and `dhcp` you need something like:
+
+ :global LogForwardInclude "(account|dhcp)";
+
Also notification settings are required for
[e-mail](mod/notification-email.md),
-[matrix](mod/notification-matrix.md) and/or
+[matrix](mod/notification-matrix.md),
+[ntfy](mod/notification-ntfy.md) and/or
[telegram](mod/notification-telegram.md).
+Tips & Tricks
+-------------
+
+### Notification on reboot
+
+You want to receive a notification on every device (re-)boot? Quite easy,
+just add:
+
+ :global LogForwardIncludeMessage "(^router rebooted)";
+
+This will match on every log message beginning with `router rebooted`.
+
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/mod/bridge-port-to.md b/doc/mod/bridge-port-to.md
index f86b21d..5c8bebc 100644
--- a/doc/mod/bridge-port-to.md
+++ b/doc/mod/bridge-port-to.md
@@ -1,7 +1,14 @@
Manage ports in bridge
======================
-[◀ Go back to main README](../../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../../README.md)
> ℹ️️ **Info**: This module can not be used on its own but requires the base
> installation. See [main README](../../README.md) for details.
@@ -77,5 +84,5 @@ See also
* [Manage VLANs on bridge ports](bridge-port-vlan.md)
---
-[◀ Go back to main README](../../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/mod/bridge-port-vlan.md b/doc/mod/bridge-port-vlan.md
index 0e6c28f..d23d5b5 100644
--- a/doc/mod/bridge-port-vlan.md
+++ b/doc/mod/bridge-port-vlan.md
@@ -1,7 +1,14 @@
Manage VLANs on bridge ports
============================
-[◀ Go back to main README](../../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../../README.md)
> ℹ️️ **Info**: This module can not be used on its own but requires the base
> installation. See [main README](../../README.md) for details.
@@ -81,5 +88,5 @@ See also
* [Manage ports in bridge](bridge-port-to.md)
---
-[◀ Go back to main README](../../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/mod/inspectvar.md b/doc/mod/inspectvar.md
index 7782c8a..d4e59b3 100644
--- a/doc/mod/inspectvar.md
+++ b/doc/mod/inspectvar.md
@@ -1,7 +1,14 @@
Inspect variables
=================
-[◀ Go back to main README](../../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../../README.md)
> ℹ️️ **Info**: This module can not be used on its own but requires the base
> installation. See [main README](../../README.md) for details.
@@ -29,5 +36,5 @@ Call the function `$InspectVar` with a variable as parameter:
![InspectVar](inspectvar.d/inspectvar.avif)
---
-[◀ Go back to main README](../../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/mod/ipcalc.md b/doc/mod/ipcalc.md
index a3e7fc8..cb655bc 100644
--- a/doc/mod/ipcalc.md
+++ b/doc/mod/ipcalc.md
@@ -1,7 +1,14 @@
IP address calculation
======================
-[◀ Go back to main README](../../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../../README.md)
> ℹ️️ **Info**: This module can not be used on its own but requires the base
> installation. See [main README](../../README.md) for details.
@@ -49,5 +56,5 @@ the information in a named array.
![IPCalcReturn](ipcalc.d/ipcalcreturn.avif)
---
-[◀ Go back to main README](../../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/mod/notification-email.md b/doc/mod/notification-email.md
index 4e0ba04..2138e31 100644
--- a/doc/mod/notification-email.md
+++ b/doc/mod/notification-email.md
@@ -1,7 +1,14 @@
Send notifications via e-mail
=============================
-[◀ Go back to main README](../../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../../README.md)
> ℹ️️ **Info**: This module can not be used on its own but requires the base
> installation. See [main README](../../README.md) for details.
@@ -26,10 +33,16 @@ Configuration
Set up your device's
[e-mail settings](https://wiki.mikrotik.com/wiki/Manual:Tools/email).
+Also make sure the device has correct time configured, best is to set up
+the ntp client.
Then edit `global-config-overlay`, add `EmailGeneralTo` with a valid
recipient address. Finally reload the configuration.
+> ℹ️ **Info**: Copy relevant configuration from
+> [`global-config`](../../global-config.rsc) (the one without `-overlay`) to
+> your local `global-config-overlay` and modify it to your specific needs.
+
### Sending to several recipients
Sending notifications to several recipients is possible as well. Add
@@ -42,22 +55,34 @@ Usage and invocation
There's nothing special to do. Every script or function sending a notification
will now send it to your e-mail account.
-But of course you can send notifications directly or use a function in your
-own scripts. Give it a try:
+But of course you can use the function to send notifications directly. Give
+it a try:
- $SendEMail "Subject..." "Body..."
+ $SendEMail "Subject..." "Body...";
Alternatively this sends a notification with all available and configured
methods:
- $SendNotification "Subject..." "Body..."
+ $SendNotification "Subject..." "Body...";
+
+To use the functions in your own scripts you have to declare them first.
+Place this before you call them:
+
+ :global SendEMail;
+ :global SendNotification;
+
+In case there is a situation when the queue needs to be purged there is a
+function available:
+
+ $PurgeEMailQueue;
See also
--------
* [Send notifications via Matrix](notification-matrix.md)
+* [Send notifications via Ntfy](notification-ntfy.md)
* [Send notifications via Telegram](notification-telegram.md)
---
-[◀ Go back to main README](../../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/mod/notification-matrix.d/01-authenticate.avif b/doc/mod/notification-matrix.d/01-authenticate.avif
new file mode 100644
index 0000000..b897943
--- /dev/null
+++ b/doc/mod/notification-matrix.d/01-authenticate.avif
Binary files differ
diff --git a/doc/mod/notification-matrix.d/01-home-server.avif b/doc/mod/notification-matrix.d/01-home-server.avif
deleted file mode 100644
index 683c7b5..0000000
--- a/doc/mod/notification-matrix.d/01-home-server.avif
+++ /dev/null
Binary files differ
diff --git a/doc/mod/notification-matrix.d/02-access-token.avif b/doc/mod/notification-matrix.d/02-access-token.avif
deleted file mode 100644
index 54109a6..0000000
--- a/doc/mod/notification-matrix.d/02-access-token.avif
+++ /dev/null
Binary files differ
diff --git a/doc/mod/notification-matrix.d/02-join-room.avif b/doc/mod/notification-matrix.d/02-join-room.avif
new file mode 100644
index 0000000..ad99ffd
--- /dev/null
+++ b/doc/mod/notification-matrix.d/02-join-room.avif
Binary files differ
diff --git a/doc/mod/notification-matrix.d/03-join-room.avif b/doc/mod/notification-matrix.d/03-join-room.avif
deleted file mode 100644
index 45974b8..0000000
--- a/doc/mod/notification-matrix.d/03-join-room.avif
+++ /dev/null
Binary files differ
diff --git a/doc/mod/notification-matrix.md b/doc/mod/notification-matrix.md
index b1f520e..92383be 100644
--- a/doc/mod/notification-matrix.md
+++ b/doc/mod/notification-matrix.md
@@ -1,7 +1,14 @@
Send notifications via Matrix
=============================
-[◀ Go back to main README](../../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../../README.md)
> ℹ️️ **Info**: This module can not be used on its own but requires the base
> installation. See [main README](../../README.md) for details.
@@ -21,8 +28,8 @@ Just install the module:
$ScriptInstallUpdate mod/notification-matrix;
Also install a Matrix client on at least one of your mobile and/or desktop
-devices. As there is no privilege separation you should create a dedicated
-notification account, in addition to your general user account.
+devices. Create and setup an account there, we will reference that as
+"*general account*" later.
Configuration
-------------
@@ -31,58 +38,60 @@ Edit `global-config-overlay`, add `MatrixHomeServer`, `MatrixAccessToken` and
`MatrixRoom` - see below on hints how to retrieve this information. Then
reload the configuration.
-### Home server
+> ℹ️ **Info**: Copy relevant configuration from
+> [`global-config`](../../global-config.rsc) (the one without `-overlay`) to
+> your local `global-config-overlay` and modify it to your specific needs.
-Matrix user accounts are identified by a unique user id in the form of
-`@localpart:domain`. The `domain` part is not necessarily your home server
-address, you have to resolve it with the procedure described in the
-[Matrix specification](https://spec.matrix.org/latest/client-server-api/#server-discovery).
+The Matrix server is connected via encrypted https, and certificate
+verification is applied. So make sure you have the certificate chain for
+your server in device's certificate store.
-Your best bet is to query the server at `domain` with the
-[well-known uri](https://spec.matrix.org/latest/client-server-api/#well-known-uri).
-For "*matrix.org*" this query is:
+> ℹ️ **Info**: The *matrix.org* server uses a Cloudflare certificate. You can
+> install that with: `$CertificateAvailable "Cloudflare Inc ECC CA-3"`
- /tool/fetch "https://matrix.org/.well-known/matrix/client" output=user;
+### From other device
-![home server](notification-matrix.d/01-home-server.avif)
+If you have setup your Matrix *notification account* before just reuse that.
+Copy the relevant configuration to the device to be configured.
-So the home server for "*matrix.org*" is "*matrix-client.matrix.org*".
-Please strip the protocol ("*https://*") for `MatrixHomeServer` if given.
+### Setup new account
-### Access token
+As there is no privilege separation you should create a dedicated account
+for use with these scripts, in addition to your *general account*.
+We will reference that as "*notification account*" in the following steps.
-After discovering the correct home server an access token has to be created.
-For this the login credentials (username and password) of the notification
-account must be sent to the home server via
-[client server api](https://matrix.org/docs/guides/client-server-api#login).
+#### Authenticate
+
+Matrix user accounts are identified by a unique user id in the form of
+`@localpart:domain`. Use that and your password to generate an access token
+and write first part of the configuration:
-We use the home server discovered above, "*matrix-client.matrix.org*".
-The user is "*example*" and password is "*v3ry-s3cr3t*".
+ $SetupMatrixAuthenticate "@example:matrix.org" "v3ry-s3cr3t";
- /tool/fetch "https://matrix-client.matrix.org/_matrix/client/r0/login" http-method=post http-data="{\"type\":\"m.login.password\", \"user\":\"example\", \"password\":\"v3ry-s3cr3t\"}" output=user;
+![authenticate](notification-matrix.d/01-authenticate.avif)
-![access token](notification-matrix.d/02-access-token.avif)
+The configuration is written to a new configuration snippet
+`global-config-overlay.d/mod/notification-matrix`.
-The server replied with a JSON object containing the `access_token`, use that
-for `MatrixAccessToken`.
+#### Join Room
-### Room
+Every Matix chat is a room, so we have to create one. Do that with your
+*general account*, this makes sure your *general account* is the room owner.
+Then join the room and invite the *notification account* by its user id
+"*@example:matrix.org*".
+Look up the *room id* within the Matrix client, it should read like
+"*!WUcxpSjKyxSGelouhA:matrix.org*" (starting with an exclamation mark and
+ending with the domain).
-Every Matix chat is a room, so we have to create one. Do so with your general
-user, this makes sure your general user is the room owner. Then join the room
-and invite the notification user by its user id "*@example:matrix.org*". Look
-up the room id within the Matrix client, it should read like
-"*!WUcxpSjKyxSGelouhA:matrix.org*". Use that for `MatrixRoom`.
+Finally make the *notification account* join into the room by accepting
+the invite.
-Finally join the notification user to the room by accepting the invite. Again,
-this can be done with
-[client server api](https://matrix.org/docs/guides/client-server-api#joining-a-room-via-an-invite).
-Make sure to replace room id ("*!*" is escaped with "*%21*") and access token
-with your data.
+ $SetupMatrixJoinRoom "!WUcxpSjKyxSGelouhA:matrix.org";
- /tool/fetch "https://matrix-client.matrix.org/_matrix/client/r0/rooms/%21WUcxpSjKyxSGelouhA:matrix.org/join?access_token=yt_ZXdvcm0tdGVzdA_NNqUyvKHRhBLZmnzVVSK_0xu6yN" http-method=post http-data="" output=user;
+![join room](notification-matrix.d/02-join-room.avif)
-![join room](notification-matrix.d/03-join-room.avif)
+The configuration is appended to the configuration snippet
+`global-config-overlay.d/mod/notification-matrix`.
Usage and invocation
--------------------
@@ -90,22 +99,34 @@ Usage and invocation
There's nothing special to do. Every script or function sending a notification
will now send it to your Matrix account.
-But of course you can send notifications directly or use a function in your
-own scripts. Give it a try:
+But of course you can use the function to send notifications directly. Give
+it a try:
- $SendMatrix "Subject..." "Body..."
+ $SendMatrix "Subject..." "Body...";
Alternatively this sends a notification with all available and configured
methods:
- $SendNotification "Subject..." "Body..."
+ $SendNotification "Subject..." "Body...";
+
+To use the functions in your own scripts you have to declare them first.
+Place this before you call them:
+
+ :global SendMatrix;
+ :global SendNotification;
+
+In case there is a situation when the queue needs to be purged there is a
+function available:
+
+ $PurgeMatrixQueue;
See also
--------
* [Send notifications via e-mail](notification-email.md)
+* [Send notifications via Ntfy](notification-ntfy.md)
* [Send notifications via Telegram](notification-telegram.md)
---
-[◀ Go back to main README](../../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/mod/notification-ntfy.md b/doc/mod/notification-ntfy.md
new file mode 100644
index 0000000..b2330a5
--- /dev/null
+++ b/doc/mod/notification-ntfy.md
@@ -0,0 +1,91 @@
+Send notifications via Ntfy
+===========================
+
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../../README.md)
+
+> ℹ️️ **Info**: This module can not be used on its own but requires the base
+> installation. See [main README](../../README.md) for details.
+
+Description
+-----------
+
+This module adds support for sending notifications via
+[Ntfy](https://ntfy.sh/). A queue is used to make sure
+notifications are not lost on failure but sent later.
+
+Requirements and installation
+-----------------------------
+
+Just install the module:
+
+ $ScriptInstallUpdate mod/notification-ntfy;
+
+Also install the Ntfy app on your mobile device or use the
+[web app](https://ntfy.sh/app) in a browser of your choice.
+
+Configuration
+-------------
+
+Creating an account is not required. Just choose a topic and you are good
+to go.
+
+> ⚠️ **Warning**: If you use ntfy without sign-up, the topic is essentially
+> a password, so pick something that's not easily guessable.
+
+Edit `global-config-overlay`, add `NtfyServer` (leave it unchanged, unless
+you are self-hosting the service) and `NtfyTopic` with your choosen topic.
+Then reload the configuration.
+
+> ℹ️ **Info**: Copy relevant configuration from
+> [`global-config`](../../global-config.rsc) (the one without `-overlay`) to
+> your local `global-config-overlay` and modify it to your specific needs.
+
+Using a paid account or running a server on-premises allows to add additional
+basic authentication. Configure `NtfyServerUser` and `NtfyServerPass` for this.
+Even authentication via access token is possible, adding it as password with
+a blank username.
+
+Usage and invocation
+--------------------
+
+There's nothing special to do. Every script or function sending a notification
+will now send it to your Ntfy topic.
+
+But of course you can use the function to send notifications directly. Give
+it a try:
+
+ $SendNtfy "Subject..." "Body...";
+
+Alternatively this sends a notification with all available and configured
+methods:
+
+ $SendNotification "Subject..." "Body...";
+
+To use the functions in your own scripts you have to declare them first.
+Place this before you call them:
+
+ :global SendNtfy;
+ :global SendNotification;
+
+In case there is a situation when the queue needs to be purged there is a
+function available:
+
+ $PurgeNtfyQueue;
+
+See also
+--------
+
+* [Send notifications via e-mail](notification-email.md)
+* [Send notifications via Matrix](notification-matrix.md)
+* [Send notifications via Telegram](notification-telegram.md)
+
+---
+[⬅️ Go back to main README](../../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/mod/notification-telegram.d/setuserpic.avif b/doc/mod/notification-telegram.d/setuserpic.avif
new file mode 100644
index 0000000..2017d20
--- /dev/null
+++ b/doc/mod/notification-telegram.d/setuserpic.avif
Binary files differ
diff --git a/doc/mod/notification-telegram.md b/doc/mod/notification-telegram.md
index 2b1abe9..159fda9 100644
--- a/doc/mod/notification-telegram.md
+++ b/doc/mod/notification-telegram.md
@@ -1,7 +1,14 @@
Send notifications via Telegram
===============================
-[◀ Go back to main README](../../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../../README.md)
> ℹ️️ **Info**: This module can not be used on its own but requires the base
> installation. See [main README](../../README.md) for details.
@@ -41,6 +48,10 @@ Finally edit `global-config-overlay`, add `TelegramTokenId` with the token
from *BotFather* and `TelegramChatId` with your id from *GetIDs Bot*. Then
reload the configuration.
+> ℹ️ **Info**: Copy relevant configuration from
+> [`global-config`](../../global-config.rsc) (the one without `-overlay`) to
+> your local `global-config-overlay` and modify it to your specific needs.
+
### Notifications to a group
Sending notifications to a group is possible as well. Add your bot and the
@@ -53,22 +64,49 @@ Usage and invocation
There's nothing special to do. Every script or function sending a notification
will now send it to your Telegram account.
-But of course you can send notifications directly or use a function in your
-own scripts. Give it a try:
+But of course you can use the function to send notifications directly. Give
+it a try:
- $SendTelegram "Subject..." "Body..."
+ $SendTelegram "Subject..." "Body...";
Alternatively this sends a notification with all available and configured
methods:
- $SendNotification "Subject..." "Body..."
+ $SendNotification "Subject..." "Body...";
+
+To use the functions in your own scripts you have to declare them first.
+Place this before you call them:
+
+ :global SendTelegram;
+ :global SendNotification;
+
+In case there is a situation when the queue needs to be purged there is a
+function available:
+
+ $PurgeTelegramQueue;
+
+Tips & Tricks
+-------------
+
+### Set a profile photo
+
+You can use a profile photo for your bot to make it recognizable. Open the
+chat with [BotFather](https://t.me/BotFather) and set it there.
+
+![set profile photo](notification-telegram.d/setuserpic.avif)
+
+Have a look at my
+[RouterOS-Scripts Logo Color Changer](https://git.eworm.de/cgit/routeros-scripts/plain/contrib/logo-color.html)
+to create a colored version of this scripts' logo.
See also
--------
+* [Chat with your router and send commands via Telegram bot](../telegram-chat.md)
* [Send notifications via e-mail](notification-email.md)
* [Send notifications via Matrix](notification-matrix.md)
+* [Send notifications via Ntfy](notification-ntfy.md)
---
-[◀ Go back to main README](../../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/mod/scriptrunonce.md b/doc/mod/scriptrunonce.md
index 6efa1b7..c5fa891 100644
--- a/doc/mod/scriptrunonce.md
+++ b/doc/mod/scriptrunonce.md
@@ -1,7 +1,14 @@
Download script and run it once
===============================
-[◀ Go back to main README](../../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../../README.md)
> ℹ️️ **Info**: This module can not be used on its own but requires the base
> installation. See [main README](../../README.md) for details.
@@ -27,9 +34,13 @@ The optional configuration goes to `global-config-overlay`.
* `ScriptRunOnceBaseUrl`: base url, prepended to parameter
* `ScriptRunOnceUrlSuffix`: url suffix, appended to parameter
+> ℹ️ **Info**: Copy relevant configuration from
+> [`global-config`](../../global-config.rsc) (the one without `-overlay`) to
+> your local `global-config-overlay` and modify it to your specific needs.
+
If the parameter passed to the function is not a complete URL (starting
-with protocol `ftp://`, `http://`, `https://` or `sftp://`) the values are
-prepended and appended.
+with protocol `ftp://`, `http://`, `https://` or `sftp://`) the base-url is
+prepended, and file extension `.rsc` and url-suffix are appended.
Usage and invocation
--------------------
@@ -44,5 +55,5 @@ The function `$ScriptRunOnce` expects an URL (or name if
Giving multiple scripts is possible, separated by comma.
---
-[◀ Go back to main README](../../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/mod/ssh-keys-import.md b/doc/mod/ssh-keys-import.md
new file mode 100644
index 0000000..db8e322
--- /dev/null
+++ b/doc/mod/ssh-keys-import.md
@@ -0,0 +1,73 @@
+Import ssh keys for public key authentication
+=============================================
+
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../../README.md)
+
+> ℹ️️ **Info**: This module can not be used on its own but requires the base
+> installation. See [main README](../../README.md) for details.
+
+Description
+-----------
+
+RouterOS supports ssh login with public key authentication. The functions
+in this module help importing the keys.
+
+Requirements and installation
+-----------------------------
+
+Just install the module:
+
+ $ScriptInstallUpdate mod/ssh-keys-import;
+
+Usage and invocation
+--------------------
+
+### Import single key from terminal
+
+Call the function `$SSHKeysImport` with key and user as parameter to
+import that key:
+
+ $SSHKeysImport "ssh-rsa AAAAB3Nza...QYZk8= user" admin;
+
+Starting with RouterOS *7.12beta1* support for keys of type `ed25519` has
+been added:
+
+ $SSHKeysImport "ssh-ed25519 AAAAC3Nza...ZVugJT user" admin;
+
+The third part of the key (`user` in this example) is inherited as
+`key-owner` in RouterOS. Also the `MD5` fingerprint is recorded, this helps
+to audit and verify the available keys.
+
+> ℹ️️ **Info**: Use `ssh-keygen` to show a fingerprint of an existing public
+> key file: `ssh-keygen -l -E md5 -f ~/.ssh/id_ed25519.pub`
+
+### Import several keys from file
+
+The functions `$SSHKeysImportFile` can read an `authorized_keys`-style file
+and import all the keys. The user given to the function can be overwritting
+from comments in the file. Create a file `keys.pub` with this content:
+
+```
+ssh-ed25519 AAAAC3Nza...3OcN8A user@client
+ssh-rsa AAAAB3Nza...ozyts= worker@station
+# user=example
+ssh-rsa AAAAB3Nza...GXQVk= person@host
+```
+
+Then import it with:
+
+ $SSHKeysImportFile keys.pub admin;
+
+This will import the first two keys for user `admin` (as given to function)
+and the third one for user `example` (as defined in comment).
+
+---
+[⬅️ Go back to main README](../../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/mode-button.md b/doc/mode-button.md
index ef7754c..8734352 100644
--- a/doc/mode-button.md
+++ b/doc/mode-button.md
@@ -1,7 +1,14 @@
Mode button with multiple presses
=================================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -52,7 +59,11 @@ Configuration
The configuration goes to `global-config-overlay`, these are the parameters:
* `ModeButton`: an array with defined actions
-* `ModeButtonLED`: led to give visual feedback
+* `ModeButtonLED`: led to give visual feedback, `type` must be `on` or `off`
+
+> ℹ️ **Info**: Copy relevant configuration from
+> [`global-config`](../global-config.rsc) (the one without `-overlay`) to
+> your local `global-config-overlay` and modify it to your specific needs.
Usage and invocation
--------------------
@@ -60,5 +71,5 @@ Usage and invocation
Press the mode button. 😜
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/netwatch-dns.md b/doc/netwatch-dns.md
index 65d0488..443106f 100644
--- a/doc/netwatch-dns.md
+++ b/doc/netwatch-dns.md
@@ -1,7 +1,14 @@
Manage DNS and DoH servers from netwatch
========================================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -43,10 +50,19 @@ Giving a specific query url for DoH is possible:
Note that using a name in DoH url may introduce a chicken-and-egg issue!
+Adding a static DNS record has the same result for the url, but always
+resolves to the same address.
+
+ /ip/dns/static/add name="dns.nextdns.io" address=199.247.16.158;
+ /tool/netwatch/add comment="doh" host=199.247.16.158;
+
+Be aware that you have to keep the ip address in sync with real world
+manually!
+
Importing a certificate automatically is possible, at least if available in
the repository (see `certs` sub directory).
- /tool/netwatch/add comment="doh, doh-cert=DigiCert TLS Hybrid ECC SHA384 2020 CA1" host=1.1.1.1;
+ /tool/netwatch/add comment="doh, doh-cert=DigiCert Global G2 TLS RSA SHA256 2020 CA1" host=1.1.1.1;
/tool/netwatch/add comment="doh, doh-cert=DigiCert TLS Hybrid ECC SHA384 2020 CA1" host=9.9.9.9;
/tool/netwatch/add comment="doh, doh-cert=GTS CA 1C3" host=8.8.8.8;
@@ -74,5 +90,5 @@ See also
* [Notify on host up and down](netwatch-notify.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/netwatch-notify.d/notification-01-down.avif b/doc/netwatch-notify.d/notification-01-down.avif
new file mode 100644
index 0000000..894fb23
--- /dev/null
+++ b/doc/netwatch-notify.d/notification-01-down.avif
Binary files differ
diff --git a/doc/netwatch-notify.d/notification-01-down.svg b/doc/netwatch-notify.d/notification-01-down.svg
deleted file mode 100644
index 13988a3..0000000
--- a/doc/netwatch-notify.d/notification-01-down.svg
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg id="svg8" width="463.78" height="93.78" version="1.1" viewBox="0 0 122.71 24.812" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
- <metadata id="metadata5">
- <rdf:RDF>
- <cc:Work rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g id="layer1" transform="translate(16.375 11.083)">
- <rect id="rect857" x="-15.875" y="-10.583" width="121.71" height="23.812" rx="1.5214" fill="#e6e6e6" stroke="#6c5d53" stroke-linecap="round" stroke-linejoin="round"/>
- <g id="g884" transform="matrix(.5 0 0 .5 -12.406 -7.1146)" stroke-width="2">
- <path id="path899" d="m23.177 23.177c-2.9635 2.9635-17.991 2.9635-20.955 0-2.9635-2.9635-2.9635-17.991 0-20.955 2.9635-2.9635 17.991-2.9635 20.955 0 2.9635 2.9635 2.9635 17.991 0 20.955z" fill="#fff"/>
- <g id="g871">
- <g id="text837" stroke-width=".52916px" aria-label="#!rsc">
- <path id="path851" d="m7.4832 16.646v-1.0239h-0.54606l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.97511l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.70208v1.0239h0.56556l-0.24378 1.8722h-0.68257v1.0239h0.54606l-0.18527 1.3944h1.2774l0.18527-1.3944h0.97511l-0.18527 1.3944h1.2774l0.18527-1.3944h0.70208v-1.0239h-0.56556l0.24378-1.8722zm-2.2037 1.8722h-0.97511l0.24378-1.8722h0.97511z"/>
- <path id="path853" d="m9.6187 14.179h-1.6382l0.19502 4.271h1.2481zm-0.81909 5.1583c-0.48755 0-0.8776 0.39979-0.8776 0.8776 0 0.48755 0.39004 0.88735 0.8776 0.88735 0.4973 0 0.88735-0.39979 0.88735-0.88735 0-0.4778-0.39004-0.8776-0.88735-0.8776z"/>
- <path id="path855" d="m13.373 15.612c-0.59482 0-1.1019 0.42905-1.3359 1.1506l-0.13652-1.0044h-1.3359v5.1778h1.5407v-2.6035c0.17552-0.77033 0.4388-1.2286 1.0726-1.2286 0.16577 0 0.30228 0.02925 0.46805 0.06826l0.24378-1.4919c-0.17552-0.04875-0.32178-0.06826-0.51681-0.06826z"/>
- <path id="path857" d="m16.181 15.592c-1.3066 0-2.116 0.69233-2.116 1.5797 0 0.79959 0.50706 1.3261 1.5309 1.6187 0.9361 0.26328 1.0921 0.37054 1.0921 0.72158 0 0.31203-0.28278 0.48755-0.75083 0.48755-0.50706 0-0.98486-0.20477-1.3749-0.50706l-0.75083 0.83859c0.50706 0.4583 1.2676 0.77033 2.1647 0.77033 1.2871 0 2.3012-0.63382 2.3012-1.7064 0-0.92635-0.57531-1.3554-1.5992-1.6479-0.92635-0.27303-1.0629-0.39004-1.0629-0.66307 0-0.23402 0.20477-0.39004 0.62407-0.39004 0.44855 0 0.8776 0.14627 1.2774 0.39979l0.56556-0.86784c-0.4778-0.39004-1.1506-0.63382-1.9015-0.63382z"/>
- <path id="path859" d="m21.281 15.592c-1.5504 0-2.5353 1.1506-2.5353 2.7986 0 1.6382 0.97511 2.7108 2.5645 2.7108 0.71183 0 1.2676-0.23403 1.7454-0.61432l-0.67282-0.9556c-0.37054 0.23403-0.62407 0.35104-0.99461 0.35104-0.61432 0-1.0239-0.35104-1.0239-1.5017 0-1.1604 0.38029-1.6089 1.0434-1.6089 0.35104 0 0.65332 0.11701 0.98486 0.37054l0.66307-0.9166c-0.4973-0.4193-1.0531-0.63382-1.7747-0.63382z"/>
- </g>
- <g id="g1542" transform="matrix(2 0 0 2 -.41134 3.175)" fill="#676867" fill-rule="evenodd" stroke-width=".26458">
- <path id="path943" d="m4.9596-1.0196c0.40797 2.8312 1.9272 4.5499 5.0239 4.691-2.918 1.1164-5.9253-1.5076-5.0239-4.691"/>
- <path id="path945" d="m3.3407-0.52096c0.034969-0.00777 0.038854 0.015542 0.041445 0.041445 0.098431 1.8054 0.85998 3.1744 1.8689 4.1108 1.0089 0.93639 2.3636 1.6941 4.274 1.6604-3.5772 1.4247-7.337-1.9984-6.1856-5.8126"/>
- </g>
- </g>
- </g>
- <text id="text4811" transform="matrix(.26458 0 0 .26458 -45.214 -6.6039)" x="-248.88142" fill="#000000" font-family="'Fira Mono', 'Roboto Mono', monospace" font-size="12px" letter-spacing="0px" stroke-width="1px" word-spacing="0px" style="font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;line-height:15px;shape-inside:url(#rect4813);white-space:pre" xml:space="preserve"><tspan id="tspan2277" x="180" y="10.85">[MikroTik] ❌ Netwatch Notify: example.com down
-</tspan><tspan id="tspan2279" x="180" y="25.85">
-</tspan><tspan id="tspan2281" x="180" y="40.85">The host 'example.com' (93.184.216.34) is down
-</tspan><tspan id="tspan2283" x="180" y="55.85">since jun/08/2021 06:55:03.</tspan></text>
- </g>
-</svg>
diff --git a/doc/netwatch-notify.d/notification-02-up.avif b/doc/netwatch-notify.d/notification-02-up.avif
new file mode 100644
index 0000000..9021a93
--- /dev/null
+++ b/doc/netwatch-notify.d/notification-02-up.avif
Binary files differ
diff --git a/doc/netwatch-notify.d/notification-02-up.svg b/doc/netwatch-notify.d/notification-02-up.svg
deleted file mode 100644
index 32dfbcc..0000000
--- a/doc/netwatch-notify.d/notification-02-up.svg
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg id="svg8" width="493.78" height="113.78" version="1.1" viewBox="0 0 130.65 30.104" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
- <metadata id="metadata5">
- <rdf:RDF>
- <cc:Work rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g id="layer1" transform="translate(16.375 11.083)">
- <rect id="rect857" x="-15.875" y="-10.583" width="129.65" height="29.104" rx="1.6206" fill="#e6e6e6" stroke="#6c5d53" stroke-linecap="round" stroke-linejoin="round"/>
- <g id="g884" transform="matrix(.5 0 0 .5 -12.406 -7.1146)" stroke-width="2">
- <path id="path899" d="m23.177 23.177c-2.9635 2.9635-17.991 2.9635-20.955 0-2.9635-2.9635-2.9635-17.991 0-20.955 2.9635-2.9635 17.991-2.9635 20.955 0 2.9635 2.9635 2.9635 17.991 0 20.955z" fill="#fff"/>
- <g id="g871">
- <g id="text837" stroke-width=".52916px" aria-label="#!rsc">
- <path id="path851" d="m7.4832 16.646v-1.0239h-0.54606l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.97511l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.70208v1.0239h0.56556l-0.24378 1.8722h-0.68257v1.0239h0.54606l-0.18527 1.3944h1.2774l0.18527-1.3944h0.97511l-0.18527 1.3944h1.2774l0.18527-1.3944h0.70208v-1.0239h-0.56556l0.24378-1.8722zm-2.2037 1.8722h-0.97511l0.24378-1.8722h0.97511z"/>
- <path id="path853" d="m9.6187 14.179h-1.6382l0.19502 4.271h1.2481zm-0.81909 5.1583c-0.48755 0-0.8776 0.39979-0.8776 0.8776 0 0.48755 0.39004 0.88735 0.8776 0.88735 0.4973 0 0.88735-0.39979 0.88735-0.88735 0-0.4778-0.39004-0.8776-0.88735-0.8776z"/>
- <path id="path855" d="m13.373 15.612c-0.59482 0-1.1019 0.42905-1.3359 1.1506l-0.13652-1.0044h-1.3359v5.1778h1.5407v-2.6035c0.17552-0.77033 0.4388-1.2286 1.0726-1.2286 0.16577 0 0.30228 0.02925 0.46805 0.06826l0.24378-1.4919c-0.17552-0.04875-0.32178-0.06826-0.51681-0.06826z"/>
- <path id="path857" d="m16.181 15.592c-1.3066 0-2.116 0.69233-2.116 1.5797 0 0.79959 0.50706 1.3261 1.5309 1.6187 0.9361 0.26328 1.0921 0.37054 1.0921 0.72158 0 0.31203-0.28278 0.48755-0.75083 0.48755-0.50706 0-0.98486-0.20477-1.3749-0.50706l-0.75083 0.83859c0.50706 0.4583 1.2676 0.77033 2.1647 0.77033 1.2871 0 2.3012-0.63382 2.3012-1.7064 0-0.92635-0.57531-1.3554-1.5992-1.6479-0.92635-0.27303-1.0629-0.39004-1.0629-0.66307 0-0.23402 0.20477-0.39004 0.62407-0.39004 0.44855 0 0.8776 0.14627 1.2774 0.39979l0.56556-0.86784c-0.4778-0.39004-1.1506-0.63382-1.9015-0.63382z"/>
- <path id="path859" d="m21.281 15.592c-1.5504 0-2.5353 1.1506-2.5353 2.7986 0 1.6382 0.97511 2.7108 2.5645 2.7108 0.71183 0 1.2676-0.23403 1.7454-0.61432l-0.67282-0.9556c-0.37054 0.23403-0.62407 0.35104-0.99461 0.35104-0.61432 0-1.0239-0.35104-1.0239-1.5017 0-1.1604 0.38029-1.6089 1.0434-1.6089 0.35104 0 0.65332 0.11701 0.98486 0.37054l0.66307-0.9166c-0.4973-0.4193-1.0531-0.63382-1.7747-0.63382z"/>
- </g>
- <g id="g1542" transform="matrix(2 0 0 2 -.41134 3.175)" fill="#676867" fill-rule="evenodd" stroke-width=".26458">
- <path id="path943" d="m4.9596-1.0196c0.40797 2.8312 1.9272 4.5499 5.0239 4.691-2.918 1.1164-5.9253-1.5076-5.0239-4.691"/>
- <path id="path945" d="m3.3407-0.52096c0.034969-0.00777 0.038854 0.015542 0.041445 0.041445 0.098431 1.8054 0.85998 3.1744 1.8689 4.1108 1.0089 0.93639 2.3636 1.6941 4.274 1.6604-3.5772 1.4247-7.337-1.9984-6.1856-5.8126"/>
- </g>
- </g>
- </g>
- <text id="text4811" transform="matrix(.26458 0 0 .26458 -45.214 -6.6039)" x="-248.88142" fill="#000000" font-family="'Fira Mono', 'Roboto Mono', monospace" font-size="12px" letter-spacing="0px" stroke-width="1px" word-spacing="0px" style="font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;line-height:15px;shape-inside:url(#rect4813);white-space:pre" xml:space="preserve"><tspan id="tspan2242" x="180" y="10.85">[MikroTik] ✅ Netwatch Notify: example.com up
-</tspan><tspan id="tspan2244" x="180" y="25.85">
-</tspan><tspan id="tspan2246" x="180" y="40.85">The host 'example.com' (93.184.216.34) is up
-</tspan><tspan id="tspan2248" x="180" y="55.85">since jun/08/2021 07:01:00.
-</tspan><tspan id="tspan2250" x="180" y="70.85">It was down for 6 checks since jun/08/2021 06:55:03.</tspan></text>
- </g>
-</svg>
diff --git a/doc/netwatch-notify.md b/doc/netwatch-notify.md
index 032106a..2db32bb 100644
--- a/doc/netwatch-notify.md
+++ b/doc/netwatch-notify.md
@@ -1,7 +1,14 @@
Notify on host up and down
==========================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -17,8 +24,8 @@ optional parent host is not down to avoid false alerts.
### Sample notifications
-![netwatch-notify notification down](netwatch-notify.d/notification-01-down.svg)
-![netwatch-notify notification up](netwatch-notify.d/notification-02-up.svg)
+![netwatch-notify notification down](netwatch-notify.d/notification-01-down.avif)
+![netwatch-notify notification up](netwatch-notify.d/notification-02-up.avif)
Requirements and installation
-----------------------------
@@ -38,6 +45,12 @@ The hosts to be checked have to be added to netwatch with specific comment:
/tool/netwatch/add comment="notify, name=example.com" host=[ :resolve "example.com" ];
+Also notification settings are required for
+[e-mail](mod/notification-email.md),
+[matrix](mod/notification-matrix.md),
+[ntfy](mod/notification-ntfy.md) and/or
+[telegram](mod/notification-telegram.md).
+
### Hooks
It is possible to run an up hook command (`up-hook`) or down hook command
@@ -50,6 +63,9 @@ Also there is a `pre-down-hook` that fires at two thirds of failed checks
required for the notification. The idea is to fix the issue before a
notification is sent.
+Getting the escaping right may be troublesome. Please consider adding a
+script in `/system/script`, then running that from hook.
+
### Count threshould
The count threshould (default is 5 checks) is configurable as well:
@@ -74,9 +90,9 @@ with a resolvable name:
/tool/netwatch/add comment="notify, name=example.com, resolve=example.com";
-But be warned: Dynamic updates will probably cause issues if the name has
-more than one record in dns - a high rate of configuration changes (and flash
-writes) at least.
+This supports multiple A or AAAA records for a name just fine, even a CNAME
+to those. An update happens only if no more record with the configured host
+address is found.
### No notification on host down
@@ -88,10 +104,28 @@ powered off, but accessibility is of interest.
Go and get your coffee ☕️ before sending the print job.
-Also notification settings are required for
-[e-mail](mod/notification-email.md),
-[matrix](mod/notification-matrix.md) and/or
-[telegram](mod/notification-telegram.md).
+### No log on failed resolve
+
+A message is writting to log after three failed attemts to resolve a host.
+However this can cause some noise for hosts that are expected to have
+failures, for example when the name is dynamically added by
+[`dhcp-to-dns`](dhcp-to-dns.md). This can be suppressed:
+
+ /tool/netwatch/add comment="notify, name=client, resolve=client.dhcp.example.com, no-resolve-fail" host=10.0.0.0;
+
+### Add a note in notification
+
+For some extra information it is possible to add a text note. This is
+included verbatim into the notification.
+
+ /tool/netwatch/add comment="notify, name=example, note=Do not touch!" host=10.0.0.31;
+
+### Add a link in notification
+
+It is possible to add a link in notification, that is added below the
+formatted notification text.
+
+ /tool/netwatch/add comment="notify, name=example.com, resolve=example.com, link=https://example.com/";
Tips & Tricks
-------------
@@ -151,5 +185,5 @@ See also
* [Manage DNS and DoH servers from netwatch](netwatch-dns.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/ospf-to-leds.md b/doc/ospf-to-leds.md
index 5ab5c75..121f77b 100644
--- a/doc/ospf-to-leds.md
+++ b/doc/ospf-to-leds.md
@@ -1,7 +1,14 @@
Visualize OSPF state via LEDs
=============================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -33,5 +40,5 @@ instance `default` via LED `user-led` set this:
/routing/ospf/instance/set default comment="ospf-to-leds, leds=user-led";
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/packages-update.md b/doc/packages-update.md
index 57f02d9..fae3896 100644
--- a/doc/packages-update.md
+++ b/doc/packages-update.md
@@ -1,7 +1,14 @@
Manage system update
====================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -16,8 +23,12 @@ verification.
But it provides some extra functionality:
+* upload backup to Mikrotik cloud if [backup-cloud](backup-cloud.md) is
+ installed
* send backup via e-mail if [backup-email](backup-email.md) is installed
-* upload backup if [backup-upload](backup-upload.md) is installed
+* save configuration to fallback partition if
+ [backup-partition](backup-partition.md) is installed
+* upload backup to server if [backup-upload](backup-upload.md) is installed
* schedule reboot at night
Requirements and installation
@@ -30,6 +41,21 @@ Just install the script:
It is automatically run by [check-routeros-update](check-routeros-update.md)
if available.
+Configuration
+-------------
+
+The configuration goes to `global-config-overlay`, this is the only parameter:
+
+* `PackagesUpdateDeferReboot`: defer the reboot for night (between 3 AM
+ and 5 AM)
+
+By modifying the scheduler's `start-time` you can force the reboot at
+different time.
+
+> ℹ️ **Info**: Copy relevant configuration from
+> [`global-config`](../global-config.rsc) (the one without `-overlay`) to
+> your local `global-config-overlay` and modify it to your specific needs.
+
Usage and invocation
--------------------
@@ -40,13 +66,13 @@ Alternatively run it manually:
See also
--------
-* [Notify on RouterOS update](check-routeros-update.md)
* [Upload backup to Mikrotik cloud](backup-cloud.md)
* [Send backup via e-mail](backup-email.md)
-* [Save configuration to fallback partition](doc/backup-partition.md)
+* [Save configuration to fallback partition](backup-partition.md)
* [Upload backup to server](backup-upload.md)
+* [Notify on RouterOS update](check-routeros-update.md)
* [Automatically upgrade firmware and reboot](firmware-upgrade-reboot.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/ppp-on-up.md b/doc/ppp-on-up.md
index 7545c5e..21847c7 100644
--- a/doc/ppp-on-up.md
+++ b/doc/ppp-on-up.md
@@ -1,7 +1,14 @@
Run scripts on ppp connection
=============================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -33,5 +40,5 @@ See also
* [Update tunnelbroker configuration](update-tunnelbroker.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/sms-action.md b/doc/sms-action.md
index d2e3252..b4678af 100644
--- a/doc/sms-action.md
+++ b/doc/sms-action.md
@@ -1,7 +1,14 @@
Act on received SMS
===================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -28,6 +35,10 @@ The configuration goes to `global-config-overlay`, this is the only parameter:
* `SmsAction`: an array with pre-defined actions
+> ℹ️ **Info**: Copy relevant configuration from
+> [`global-config`](../global-config.rsc) (the one without `-overlay`) to
+> your local `global-config-overlay` and modify it to your specific needs.
+
Then enable SMS actions:
/tool/sms/set allowed-number=+491234567890 receive-enabled=yes secret=s3cr3t;
@@ -48,5 +59,5 @@ See also
* [Forward received SMS](sms-forward.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/sms-forward.d/notification.avif b/doc/sms-forward.d/notification.avif
new file mode 100644
index 0000000..01eb7ba
--- /dev/null
+++ b/doc/sms-forward.d/notification.avif
Binary files differ
diff --git a/doc/sms-forward.d/notification.svg b/doc/sms-forward.d/notification.svg
deleted file mode 100644
index 4b94850..0000000
--- a/doc/sms-forward.d/notification.svg
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg id="svg8" width="443.78" height="123.78" version="1.1" viewBox="0 0 117.42 32.75" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
- <metadata id="metadata5">
- <rdf:RDF>
- <cc:Work rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g id="layer1" transform="translate(16.375 11.083)">
- <rect id="rect857" x="-15.875" y="-10.583" width="116.42" height="31.75" rx="1.4552" fill="#e6e6e6" stroke="#6c5d53" stroke-linecap="round" stroke-linejoin="round"/>
- <g id="g884" transform="matrix(.5 0 0 .5 -12.406 -7.1146)" stroke-width="2">
- <path id="path899" d="m23.177 23.177c-2.9635 2.9635-17.991 2.9635-20.955 0-2.9635-2.9635-2.9635-17.991 0-20.955 2.9635-2.9635 17.991-2.9635 20.955 0 2.9635 2.9635 2.9635 17.991 0 20.955z" fill="#fff"/>
- <g id="g871">
- <g id="text837" stroke-width=".52916px" aria-label="#!rsc">
- <path id="path851" d="m7.4832 16.646v-1.0239h-0.54606l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.97511l0.16577-1.2774h-1.2774l-0.16577 1.2774h-0.70208v1.0239h0.56556l-0.24378 1.8722h-0.68257v1.0239h0.54606l-0.18527 1.3944h1.2774l0.18527-1.3944h0.97511l-0.18527 1.3944h1.2774l0.18527-1.3944h0.70208v-1.0239h-0.56556l0.24378-1.8722zm-2.2037 1.8722h-0.97511l0.24378-1.8722h0.97511z"/>
- <path id="path853" d="m9.6187 14.179h-1.6382l0.19502 4.271h1.2481zm-0.81909 5.1583c-0.48755 0-0.8776 0.39979-0.8776 0.8776 0 0.48755 0.39004 0.88735 0.8776 0.88735 0.4973 0 0.88735-0.39979 0.88735-0.88735 0-0.4778-0.39004-0.8776-0.88735-0.8776z"/>
- <path id="path855" d="m13.373 15.612c-0.59482 0-1.1019 0.42905-1.3359 1.1506l-0.13652-1.0044h-1.3359v5.1778h1.5407v-2.6035c0.17552-0.77033 0.4388-1.2286 1.0726-1.2286 0.16577 0 0.30228 0.02925 0.46805 0.06826l0.24378-1.4919c-0.17552-0.04875-0.32178-0.06826-0.51681-0.06826z"/>
- <path id="path857" d="m16.181 15.592c-1.3066 0-2.116 0.69233-2.116 1.5797 0 0.79959 0.50706 1.3261 1.5309 1.6187 0.9361 0.26328 1.0921 0.37054 1.0921 0.72158 0 0.31203-0.28278 0.48755-0.75083 0.48755-0.50706 0-0.98486-0.20477-1.3749-0.50706l-0.75083 0.83859c0.50706 0.4583 1.2676 0.77033 2.1647 0.77033 1.2871 0 2.3012-0.63382 2.3012-1.7064 0-0.92635-0.57531-1.3554-1.5992-1.6479-0.92635-0.27303-1.0629-0.39004-1.0629-0.66307 0-0.23402 0.20477-0.39004 0.62407-0.39004 0.44855 0 0.8776 0.14627 1.2774 0.39979l0.56556-0.86784c-0.4778-0.39004-1.1506-0.63382-1.9015-0.63382z"/>
- <path id="path859" d="m21.281 15.592c-1.5504 0-2.5353 1.1506-2.5353 2.7986 0 1.6382 0.97511 2.7108 2.5645 2.7108 0.71183 0 1.2676-0.23403 1.7454-0.61432l-0.67282-0.9556c-0.37054 0.23403-0.62407 0.35104-0.99461 0.35104-0.61432 0-1.0239-0.35104-1.0239-1.5017 0-1.1604 0.38029-1.6089 1.0434-1.6089 0.35104 0 0.65332 0.11701 0.98486 0.37054l0.66307-0.9166c-0.4973-0.4193-1.0531-0.63382-1.7747-0.63382z"/>
- </g>
- <g id="g1542" transform="matrix(2 0 0 2 -.41134 3.175)" fill="#676867" fill-rule="evenodd" stroke-width=".26458">
- <path id="path943" d="m4.9596-1.0196c0.40797 2.8312 1.9272 4.5499 5.0239 4.691-2.918 1.1164-5.9253-1.5076-5.0239-4.691"/>
- <path id="path945" d="m3.3407-0.52096c0.034969-0.00777 0.038854 0.015542 0.041445 0.041445 0.098431 1.8054 0.85998 3.1744 1.8689 4.1108 1.0089 0.93639 2.3636 1.6941 4.274 1.6604-3.5772 1.4247-7.337-1.9984-6.1856-5.8126"/>
- </g>
- </g>
- </g>
- <text id="text4811" transform="matrix(.26458 0 0 .26458 -44.966 -6.6039)" x="-248.88142" fill="#000000" font-family="'Fira Mono', 'Roboto Mono', monospace" font-size="12px" letter-spacing="0px" stroke-width="1px" word-spacing="0px" style="font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;line-height:15px;shape-inside:url(#rect4813);white-space:pre" xml:space="preserve"><tspan id="tspan2204" x="180" y="10.85">[MikroTik] 📨 SMS Forwarding from 7277
-</tspan><tspan id="tspan2206" x="180" y="25.85">
-</tspan><tspan id="tspan2208" x="180" y="40.85">Received this message by MikroTik from 7277:
-</tspan><tspan id="tspan2210" x="180" y="55.85">
-</tspan><tspan id="tspan2212" x="180" y="70.85">On Jun/12/2021 13:44:10 GMT -0 type class-0:
-</tspan><tspan id="tspan2214" x="180" y="85.85">Welcome to our network!</tspan></text>
- </g>
-</svg>
diff --git a/doc/sms-forward.md b/doc/sms-forward.md
index f75b78f..597410b 100644
--- a/doc/sms-forward.md
+++ b/doc/sms-forward.md
@@ -1,7 +1,14 @@
Forward received SMS
====================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -15,7 +22,7 @@ A broadband interface with SMS support is required.
### Sample notification
-![sms-forward notification](sms-forward.d/notification.svg)
+![sms-forward notification](sms-forward.d/notification.avif)
Requirements and installation
-----------------------------
@@ -31,13 +38,55 @@ Just install the script:
Configuration
-------------
+You have to enable receiving of SMS:
+
+ /tool/sms/set receive-enabled=yes;
+
+The configuration goes to `global-config-overlay`, this is the only parameter:
+
+* `SmsForwardHooks`: an array with pre-defined hooks, where each hook consists
+ of `match` (which is matched against the received message), `allowed-number`
+ (which is matched against the sending phone number or name) and `command`.
+ For `match` and `allowed-number` regular expressions are supported. Actual
+ phone number (`$Phone`) and message (`$Message`) are available for the hook.
+
+> ℹ️ **Info**: Copy relevant configuration from
+> [`global-config`](../global-config.rsc) (the one without `-overlay`) to
+> your local `global-config-overlay` and modify it to your specific needs.
+
Notification settings are required for
[e-mail](mod/notification-email.md),
-[matrix](mod/notification-matrix.md) and/or
+[matrix](mod/notification-matrix.md),
+[ntfy](mod/notification-ntfy.md) and/or
[telegram](mod/notification-telegram.md).
-Also you have to enable receiving of SMS:
- /tool/sms/set receive-enabled=yes;
+Tips & Tricks
+-------------
+
+### Take care of harmful commands!
+
+It is easy to fake the sending phone number! So make sure you do not rely on
+that number for potentially harmful commands. Add a shared secret to match
+into the text instead, for example: `reboot-53cr3t-5tr1n9` instead of just
+`reboot`.
+
+### Order new volume
+
+Most broadband providers include a volume limit for their data plans. The
+hook functionality can be used to order new volume automatically.
+
+Let's assume an imaginary provider **ABC** sends a message when the available
+volume is about to deplete. The message is sent from `ABC` and the text
+contains the string `80%`. New volume can be ordered by sending a SMS back to
+the phone number `1234` with the text `data-plan`.
+
+ :global SmsForwardHooks {
+ { match="80%";
+ allowed-number="ABC";
+ command="/tool/sms/send lte1 phone-number=1234 message=\"data-plan\";" };
+ };
+
+Adjust the values to your own needs.
See also
--------
@@ -45,5 +94,5 @@ See also
* [Act on received SMS](sms-action.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/ssh-keys-import.md b/doc/ssh-keys-import.md
index d83311f..d1325aa 100644
--- a/doc/ssh-keys-import.md
+++ b/doc/ssh-keys-import.md
@@ -1,33 +1,2 @@
-Import SSH keys
-===============
-
-[◀ Go back to main README](../README.md)
-
-Description
------------
-
-This script imports public SSH keys (files with extension "`pub`") into
-local store for user authentication.
-
-Requirements and installation
------------------------------
-
-Just install the script:
-
- $ScriptInstallUpdate ssh-keys-import;
-
-Usage and invocation
---------------------
-
-Copy files with extension "`pub`" containing public SSH keys for your device.
-Then run the script:
-
- /system/script/run ssh-keys-import;
-
-Starting with an `authorized_keys` file you can split it on a shell:
-
- grep -E '^ssh-rsa' authorized_keys | nl -nrz | while read num type key name; do echo $type $key $name > $num-$name.pub; done
-
----
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+This script has been replaced by a module. Please see
+[Import ssh keys for public key authentication](mod/ssh-keys-import.md).
diff --git a/doc/super-mario-theme.md b/doc/super-mario-theme.md
index 8142cda..e4bae2e 100644
--- a/doc/super-mario-theme.md
+++ b/doc/super-mario-theme.md
@@ -1,7 +1,14 @@
Play Super Mario theme
======================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
Description
-----------
@@ -27,5 +34,5 @@ Just run the script to play:
For extra fun use it for dhcp lease script. :)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/telegram-chat.d/01-chat-specific.avif b/doc/telegram-chat.d/01-chat-specific.avif
new file mode 100644
index 0000000..ab75f78
--- /dev/null
+++ b/doc/telegram-chat.d/01-chat-specific.avif
Binary files differ
diff --git a/doc/telegram-chat.d/02-chat-all.avif b/doc/telegram-chat.d/02-chat-all.avif
new file mode 100644
index 0000000..ed1a389
--- /dev/null
+++ b/doc/telegram-chat.d/02-chat-all.avif
Binary files differ
diff --git a/doc/telegram-chat.d/03-reply.avif b/doc/telegram-chat.d/03-reply.avif
new file mode 100644
index 0000000..515853e
--- /dev/null
+++ b/doc/telegram-chat.d/03-reply.avif
Binary files differ
diff --git a/doc/telegram-chat.md b/doc/telegram-chat.md
new file mode 100644
index 0000000..eb4acf5
--- /dev/null
+++ b/doc/telegram-chat.md
@@ -0,0 +1,152 @@
+Chat with your router and send commands via Telegram bot
+========================================================
+
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
+
+> ℹ️ **Info**: This script can not be used on its own but requires the base
+> installation. See [main README](../README.md) for details.
+
+Description
+-----------
+
+This script makes your device poll a Telegram bot for new messages. With
+these messages you can send commands to your device and make it run them.
+The resulting output is send back to you.
+
+Requirements and installation
+-----------------------------
+
+Just install the script and the module for notifications via Telegram:
+
+ $ScriptInstallUpdate telegram-chat,mod/notification-telegram;
+
+Then create a schedule that runs the script periodically:
+
+ /system/scheduler/add start-time=startup interval=30s name=telegram-chat on-event="/system/script/run telegram-chat;";
+
+> ⚠️ **Warning**: Make sure to keep the interval in sync when installing
+> on several devices. Differing polling intervals will result in missed
+> messages.
+
+Configuration
+-------------
+
+Make sure to configure
+[notifications via telegram](mod/notification-telegram.md) first. The
+additional configuration goes to `global-config-overlay`, these are the
+parameters:
+
+* `TelegramChatIdsTrusted`: an array with trusted chat ids or user names
+* `TelegramChatGroups`: define the groups a device should belong to
+
+> ℹ️ **Info**: Copy relevant configuration from
+> [`global-config`](../global-config.rsc) (the one without `-overlay`) to
+> your local `global-config-overlay` and modify it to your specific needs.
+
+Usage and invocation
+--------------------
+
+### Activating device(s)
+
+This script is capable of chatting with multiple devices. By default a
+device is passive and not acting on messages. To activate it send a message
+containing `! identity` (exclamation mark, optional space and system's
+identity). To query all dynamic ip addresses form a device named "*MikroTik*"
+send `! MikroTik`, followed by `/ip/address/print where dynamic;`.
+
+![chat to specific device](telegram-chat.d/01-chat-specific.avif)
+
+Devices can be grouped to chat with them simultaneously. The default group
+"*all*" can be activated by sending `! @all`, which will make all devices
+act on your commands.
+
+![chat to all devices](telegram-chat.d/02-chat-all.avif)
+
+Send a single exclamation mark or non-existent identity to make all
+devices passive again.
+
+### Reply to message
+
+Let's assume you received a message from a device before, and want to send
+a command to that device. No need to activate it, you can just reply to
+that message.
+
+![reply to message](telegram-chat.d/03-reply.avif)
+
+Associated messages are cleared on device reboot.
+
+### Ask for devices
+
+Send a message with a single question mark (`?`) to query for devices
+currenty online. The answer can be used for command via reply then.
+
+Known limitations
+-----------------
+
+### Do not use numeric ids!
+
+Numeric ids are valid within a session only. Usually you can use something
+like this to print all ip addresses and remove the first one:
+
+ /ip/address/print;
+ /ip/address/remove 0;
+
+This will fail when sent in separate messages. Instead you should use basic
+scripting capabilities. Try to print what you want to act on...
+
+ /ip/address/print where interface=eth;
+
+... verify and finally remove it.
+
+ /ip/address/remove [ find where interface=eth ];
+
+What does work is using the persistent ids:
+
+ /ip/address/print show-ids;
+
+The output contains an id starting with asterisk that can be used:
+
+ /ip/address/remove *E;
+
+### Mind command runtime
+
+The command is run in background while the script waits for it - about
+20 seconds at maximum. A command exceeding that time continues to run in
+background, but the output in the message is missing or truncated then.
+
+If you still want a response you can work around this by making your code
+send information on its own. Something like this should do the job:
+
+ :global SendTelegram;
+ :delay 30s;
+ $SendTelegram "Command finished" "Your command finished...";
+
+### Output size
+
+Telegram messages have a limit of 4096 characters. If output is too large it
+is truncated, and a warning is added to the message.
+
+### Sending commands to a group
+
+Adding a bot to a group allows it to send messages to that group. To allow
+it to receive messages you have to make it an admin of that group! It is
+fine to deny all permissions, though.
+
+Also adding an admin to a group can cause the group id to change, so check
+that if notifications break suddenly.
+
+See also
+--------
+
+* [Send notifications via Telegram](mod/notification-telegram.md)
+
+---
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/unattended-lte-firmware-upgrade.md b/doc/unattended-lte-firmware-upgrade.md
index 63f2793..6680447 100644
--- a/doc/unattended-lte-firmware-upgrade.md
+++ b/doc/unattended-lte-firmware-upgrade.md
@@ -1,7 +1,14 @@
Install LTE firmware upgrade
============================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
Description
-----------
@@ -12,6 +19,7 @@ This script upgrades LTE firmware on compatible devices:
* R11e-LTE-US
* R11e-4G
* R11e-LTE6
+* ... and more - probably what ever Mikrotik builds into their devices
A temporary scheduler is created to be independent from terminal. Thus
starting the upgrade process over the broadband connection is supported.
@@ -42,5 +50,5 @@ See also
* [Notify on LTE firmware upgrade](check-lte-firmware-upgrade.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/update-gre-address.md b/doc/update-gre-address.md
index 7e87743..80902b9 100644
--- a/doc/update-gre-address.md
+++ b/doc/update-gre-address.md
@@ -1,7 +1,14 @@
Update GRE configuration with dynamic addresses
===============================================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -37,5 +44,5 @@ certificate CN into the comment:
/interface/gre/set comment="ikev2-client1" gre-client1;
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)
diff --git a/doc/update-tunnelbroker.md b/doc/update-tunnelbroker.md
index bfe8e25..2539e2f 100644
--- a/doc/update-tunnelbroker.md
+++ b/doc/update-tunnelbroker.md
@@ -1,7 +1,14 @@
Update tunnelbroker configuration
=================================
-[◀ Go back to main README](../README.md)
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../README.md)
> ℹ️ **Info**: This script can not be used on its own but requires the base
> installation. See [main README](../README.md) for details.
@@ -28,11 +35,10 @@ Configuration
The configuration goes to interface's comment:
- /interface/6to4/set comment="tunnelbroker, user=user, pass=s3cr3t, id=12345" tunnelbroker;
-
-Also enabling dynamic DNS in Mikrotik cloud is required:
+ /interface/6to4/set comment="tunnelbroker, user=user, id=12345, pass=s3cr3t" tunnelbroker;
- /ip/cloud/set ddns-enabled=yes;
+You should know you user name from login. The `id` is the tunnel's numeric
+id, `pass` is the *update key* found on the tunnel's advanced tab.
See also
--------
@@ -40,5 +46,5 @@ See also
* [Run scripts on ppp connection](ppp-on-up.md)
---
-[◀ Go back to main README](../README.md)
-[▲ Go back to top](#top)
+[⬅️ Go back to main README](../README.md)
+[⬆️ Go back to top](#top)