aboutsummaryrefslogtreecommitdiffstats
path: root/doc/mod
diff options
context:
space:
mode:
Diffstat (limited to 'doc/mod')
-rw-r--r--doc/mod/bridge-port-to.md7
-rw-r--r--doc/mod/bridge-port-vlan.md7
-rw-r--r--doc/mod/inspectvar.md7
-rw-r--r--doc/mod/ipcalc.md7
-rw-r--r--doc/mod/notification-email.md15
-rw-r--r--doc/mod/notification-gotify.d/appsetup.avifbin0 -> 18099 bytes
-rw-r--r--doc/mod/notification-gotify.md97
-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.md96
-rw-r--r--doc/mod/notification-ntfy.md99
-rw-r--r--doc/mod/notification-telegram.d/getchatid.avifbin0 -> 3896 bytes
-rw-r--r--doc/mod/notification-telegram.md46
-rw-r--r--doc/mod/scriptrunonce.md7
-rw-r--r--doc/mod/ssh-keys-import.md19
18 files changed, 344 insertions, 63 deletions
diff --git a/doc/mod/bridge-port-to.md b/doc/mod/bridge-port-to.md
index a956de4..629c526 100644
--- a/doc/mod/bridge-port-to.md
+++ b/doc/mod/bridge-port-to.md
@@ -1,6 +1,13 @@
Manage ports in bridge
======================
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
[⬅️ Go back to main README](../../README.md)
> ℹ️️ **Info**: This module can not be used on its own but requires the base
diff --git a/doc/mod/bridge-port-vlan.md b/doc/mod/bridge-port-vlan.md
index 068f050..cf29199 100644
--- a/doc/mod/bridge-port-vlan.md
+++ b/doc/mod/bridge-port-vlan.md
@@ -1,6 +1,13 @@
Manage VLANs on bridge ports
============================
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
[⬅️ Go back to main README](../../README.md)
> ℹ️️ **Info**: This module can not be used on its own but requires the base
diff --git a/doc/mod/inspectvar.md b/doc/mod/inspectvar.md
index 1cc49a2..7daba15 100644
--- a/doc/mod/inspectvar.md
+++ b/doc/mod/inspectvar.md
@@ -1,6 +1,13 @@
Inspect variables
=================
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
[⬅️ Go back to main README](../../README.md)
> ℹ️️ **Info**: This module can not be used on its own but requires the base
diff --git a/doc/mod/ipcalc.md b/doc/mod/ipcalc.md
index f2f1140..c07853e 100644
--- a/doc/mod/ipcalc.md
+++ b/doc/mod/ipcalc.md
@@ -1,6 +1,13 @@
IP address calculation
======================
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
[⬅️ Go back to main README](../../README.md)
> ℹ️️ **Info**: This module can not be used on its own but requires the base
diff --git a/doc/mod/notification-email.md b/doc/mod/notification-email.md
index 8dc2ecf..127bf96 100644
--- a/doc/mod/notification-email.md
+++ b/doc/mod/notification-email.md
@@ -1,6 +1,13 @@
Send notifications via e-mail
=============================
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
[⬅️ Go back to main README](../../README.md)
> ℹ️️ **Info**: This module can not be used on its own but requires the base
@@ -25,7 +32,7 @@ Configuration
-------------
Set up your device's
-[e-mail settings](https://wiki.mikrotik.com/wiki/Manual:Tools/email).
+[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.
@@ -51,12 +58,12 @@ will now send it to your e-mail account.
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:
@@ -72,7 +79,9 @@ function available:
See also
--------
+* [Send notifications via Gotify](notification-gotify.md)
* [Send notifications via Matrix](notification-matrix.md)
+* [Send notifications via Ntfy](notification-ntfy.md)
* [Send notifications via Telegram](notification-telegram.md)
---
diff --git a/doc/mod/notification-gotify.d/appsetup.avif b/doc/mod/notification-gotify.d/appsetup.avif
new file mode 100644
index 0000000..58f57a8
--- /dev/null
+++ b/doc/mod/notification-gotify.d/appsetup.avif
Binary files differ
diff --git a/doc/mod/notification-gotify.md b/doc/mod/notification-gotify.md
new file mode 100644
index 0000000..6fce629
--- /dev/null
+++ b/doc/mod/notification-gotify.md
@@ -0,0 +1,97 @@
+Send notifications via Gotify
+===========================
+
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../../README.md)
+
+> ℹ️️ **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
+[Gotify ↗️](https://gotify.net/). 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-gotify;
+
+Also deploy the [Gotify server ↗️](https://github.com/gotify/server) and
+optionally install a Gotify client on your mobile device.
+
+Configuration
+-------------
+
+Follow the [Installation ↗️](https://gotify.net/docs/install) instructions
+and the [First Login ↗️](https://gotify.net/docs/first-login) setup. Once
+you have a user and account you can start creating apps. Each app is an
+independent notification feed for a device or application.
+
+![Create new app](notification-gotify.d/appsetup.avif)
+
+On creation apps are assigned a *Token* for authentification, you will need
+that in configuration.
+
+Edit `global-config-overlay`, add `GotifyServer` with your server address
+(just the address, no protocol - `https://` is assumed) and `GotifyToken`
+with the *Token* from your configured app on the Gotify server. 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.
+
+For a custom service installing an additional certificate may be required.
+You may want to install that certificate manually, after finding the
+[certificate name from browser](../../CERTIFICATES.md).
+
+Usage and invocation
+--------------------
+
+There's nothing special to do. Every script or function sending a notification
+will now send it to your Gotify application feed.
+
+But of course you can use the function to send notifications directly. Give
+it a try:
+
+ $SendGotify "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 SendGotify;
+ :global SendNotification;
+
+In case there is a situation when the queue needs to be purged there is a
+function available:
+
+ $PurgeGotifyQueue;
+
+See also
+--------
+
+* [Certificate name from browser](../../CERTIFICATES.md)
+* [Send notifications via e-mail](notification-email.md)
+* [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)
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 ab8efc9..da6d6de 100644
--- a/doc/mod/notification-matrix.md
+++ b/doc/mod/notification-matrix.md
@@ -1,6 +1,13 @@
Send notifications via Matrix
=============================
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
[⬅️ Go back to main README](../../README.md)
> ℹ️️ **Info**: This module can not be used on its own but requires the base
@@ -10,7 +17,7 @@ Description
-----------
This module adds support for sending notifications via
-[Matrix](https://matrix.org/) via client server api. A queue is used to
+[Matrix ↗️](https://matrix.org/) via client server api. A queue is used to
make sure notifications are not lost on failure but sent later.
Requirements and installation
@@ -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
-------------
@@ -35,58 +42,62 @@ reload the configuration.
> [`global-config`](../../global-config.rsc) (the one without `-overlay`) to
> your local `global-config-overlay` and modify it to your specific needs.
-### Home server
+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.
-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 example below is for `matrix.org`, which uses a trust chain from *Google
+Trust Services*. Run this to import the required certificate:
+
+ $CertificateAvailable "GTS Root R4";
-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:
+Replace the CA certificate name with what ever is needed for your server.
+You may want to find the
+[certificate name from browser](../../CERTIFICATES.md).
- /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
--------------------
@@ -97,12 +108,12 @@ will now send it to your Matrix account.
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:
@@ -118,7 +129,10 @@ function available:
See also
--------
+* [Certificate name from browser](../../CERTIFICATES.md)
* [Send notifications via e-mail](notification-email.md)
+* [Send notifications via Gotify](notification-gotify.md)
+* [Send notifications via Ntfy](notification-ntfy.md)
* [Send notifications via Telegram](notification-telegram.md)
---
diff --git a/doc/mod/notification-ntfy.md b/doc/mod/notification-ntfy.md
new file mode 100644
index 0000000..993501d
--- /dev/null
+++ b/doc/mod/notification-ntfy.md
@@ -0,0 +1,99 @@
+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.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
+[⬅️ Go back to main README](../../README.md)
+
+> ℹ️️ **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.
+
+Also available is `NtfyServerToken` to add a bearer token for authentication.
+
+For a custom service installing an additional certificate may be required.
+You may want to install that certificate manually, after finding the
+[certificate name from browser](../../CERTIFICATES.md).
+
+Usage and invocation
+--------------------
+
+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
+--------
+
+* [Certificate name from browser](../../CERTIFICATES.md)
+* [Send notifications via e-mail](notification-email.md)
+* [Send notifications via Gotify](notification-gotify.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/getchatid.avif b/doc/mod/notification-telegram.d/getchatid.avif
new file mode 100644
index 0000000..7792969
--- /dev/null
+++ b/doc/mod/notification-telegram.d/getchatid.avif
Binary files differ
diff --git a/doc/mod/notification-telegram.md b/doc/mod/notification-telegram.md
index 89659c8..804104f 100644
--- a/doc/mod/notification-telegram.md
+++ b/doc/mod/notification-telegram.md
@@ -1,6 +1,13 @@
Send notifications via Telegram
===============================
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
[⬅️ Go back to main README](../../README.md)
> ℹ️️ **Info**: This module can not be used on its own but requires the base
@@ -10,7 +17,7 @@ Description
-----------
This module adds support for sending notifications via
-[Telegram](https://telegram.org/) via bot api. A queue is used to make sure
+[Telegram ↗️](https://telegram.org/) via bot api. A queue is used to make sure
notifications are not lost on failure but sent later.
Requirements and installation
@@ -26,19 +33,26 @@ and create an account.
Configuration
-------------
-Open Telegram, then start a chat with [BotFather](https://t.me/BotFather) and
+Open Telegram, then start a chat with [BotFather ↗️](https://t.me/BotFather) and
create your own bot:
![create new bot](notification-telegram.d/newbot.avif)
-Now open a chat with your bot and start it by clicking the `START` button.
+Set that token from *BotFather* (use your own!) to `TelegramTokenId`, for
+now just temporarily:
+
+ :set TelegramTokenId "5214364459:AAHLwf1o7ybbKDo6pY24Kd2bZ5rjCakDXTc";
+
+Now open a chat with your bot and start it by clicking the `START` button,
+then send your first message. Any text will do. On your device run
+`$GetTelegramChatId` to retrieve the chat id:
-Open just another chat with [GetIDs Bot](https://t.me/getidsbot), again start
-with the `START` button. It will send you some information, including the
-`id`, just below `You`.
+ $GetTelegramChatId;
+
+![get chat id](notification-telegram.d/getchatid.avif)
Finally edit `global-config-overlay`, add `TelegramTokenId` with the token
-from *BotFather* and `TelegramChatId` with your id from *GetIDs Bot*. Then
+from *BotFather* and `TelegramChatId` with your retrieved chat id. Then
reload the configuration.
> ℹ️ **Info**: Copy relevant configuration from
@@ -47,9 +61,13 @@ reload the configuration.
### Notifications to a group
-Sending notifications to a group is possible as well. Add your bot and the
-*GetIDs Bot* to a group, then use the group's id (which starts with a dash)
-for `TelegramChatId`. Then remove *GetIDs Bot* from group.
+Sending notifications to a group is possible as well. Add your bot to a group
+and make it an admin (required for read access!) and send a message and run
+`$GetTelegramChatId` again. Then use that chat id (which starts with a dash)
+for `TelegramChatId`.
+
+Groups can enable the `Topics` feature. Use `TelegramThreadId` to send to a
+specific topic in a group.
Usage and invocation
--------------------
@@ -60,12 +78,12 @@ will now send it to your Telegram account.
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:
@@ -84,7 +102,7 @@ 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.
+chat with [BotFather ↗️](https://t.me/BotFather) and set it there.
![set profile photo](notification-telegram.d/setuserpic.avif)
@@ -97,7 +115,9 @@ 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 Gotify](notification-gotify.md)
* [Send notifications via Matrix](notification-matrix.md)
+* [Send notifications via Ntfy](notification-ntfy.md)
---
[⬅️ Go back to main README](../../README.md)
diff --git a/doc/mod/scriptrunonce.md b/doc/mod/scriptrunonce.md
index 895c20c..955d12e 100644
--- a/doc/mod/scriptrunonce.md
+++ b/doc/mod/scriptrunonce.md
@@ -1,6 +1,13 @@
Download script and run it once
===============================
+[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
+[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
+[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
+[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
+
[⬅️ Go back to main README](../../README.md)
> ℹ️️ **Info**: This module can not be used on its own but requires the base
diff --git a/doc/mod/ssh-keys-import.md b/doc/mod/ssh-keys-import.md
index cf28ee2..344f4bc 100644
--- a/doc/mod/ssh-keys-import.md
+++ b/doc/mod/ssh-keys-import.md
@@ -1,6 +1,13 @@
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.16-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
@@ -27,15 +34,15 @@ Usage and invocation
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;
+ $SSHKeysImport "ssh-rsa AAAAB3Nza...QYZk8= user" admin;
The third part of the key (`user` in this example) is inherited as
-`key-owner` in RouterOS.
+`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