Compare commits

..

538 commits

Author SHA1 Message Date
Christian Hesse
2b8dfec2f7 bump required RouterOS version for all scripts 2026-01-12 10:00:30 +01:00
Christian Hesse
45bcb80125 global-functions: bump required version to 7.17...
... as we use `:convert from=num ...` which was introduced back then.

Actually the requirment did exist since commit
6ad6f9aa08.
2026-01-12 10:00:30 +01:00
Christian Hesse
e7a16ad279 check-certificates: give hint on possibly incomplete cert chain 2026-01-12 10:00:30 +01:00
Christian Hesse
5481787869 check-certificates: handle builtin certificate in chain
This includes an ugly workaround to keep it compatible with old RouterOS
versions... For now.
2026-01-12 10:00:30 +01:00
Christian Hesse
54af7fd024 check-certificates: drop workaround
This revert commit 8de6995c4b.

The exact example given in the commit message of that commit works
as expected now:

[eworm@kalyke] > $InspectVar [ $ParseKeyValueStore  [ /certificate/get ISRG-Root-X2 issuer ] ];
-type-> array
  -key-> C
    -type-> str
    -len-> 2
    -value-> US
  -key-> CN
    -type-> str
    -len-> 12
    -value-> ISRG Root X2
  -key-> O
    -type-> str
    -len-> 32
    -value-> Internet Security Research Group
2026-01-12 08:31:53 +01:00
Christian Hesse
927edc639c README: hint on the badge regarding required RouterOS version 2026-01-11 21:54:12 +01:00
Christian Hesse
377e196cb0 README: long-term channel is back! 🎉 2026-01-11 21:54:12 +01:00
Christian Hesse
3c62536f87 README: make prerequisite configuration a sub-section 2026-01-11 21:22:59 +01:00
Christian Hesse
0d71cd5b3b doc/mod/inspectvar: update screenshot...
... with fix from $CharacterMultiply and doubled indention.
2026-01-06 14:10:08 +01:00
Christian Hesse
33061fea21 mod/inspectvar: indent by two characters 2026-01-06 14:10:08 +01:00
Christian Hesse
0ceedab5db global-functions: $CharacterMultiply: return early on length zero...
... as :for loop counts backwards and would return two
character otherwise.
2026-01-06 14:10:08 +01:00
Christian Hesse
6990084d98 global-functions: $CharacterMultiply: use local variables for parameters 2026-01-06 14:10:08 +01:00
Christian Hesse
7dc230cceb contrib/telegram: add Oxford Comma in greeting 2026-01-06 00:48:49 +01:00
Christian Hesse
8878449b0b global-functions: support modules (or snippets) in global-functions.d/ 2026-01-05 11:37:58 +01:00
Christian Hesse
8fa17d4b3b check-health: fix regex to load plugins 2026-01-05 11:11:52 +01:00
Christian Hesse
8528ca376c global-config: support loading custom config snippets
This may be interesting for custom scripts which can drop their own
default global configuration.
2026-01-05 11:11:52 +01:00
Christian Hesse
4af18ced9e global-config: fix regex to load overlay snippets 2026-01-05 11:11:52 +01:00
Christian Hesse
623f96d94a update copyright for 2026 2026-01-01 13:50:07 +01:00
Christian Hesse
aa0b5a9ca2 README: add a brief description 2025-12-29 19:21:29 +01:00
Christian Hesse
ee9618014c introduce contrib/telegram...
... with all the content for Miss Rose.

https://t.me/MissRose_bot
2025-12-25 23:56:00 +01:00
Christian Hesse
0745f09a8a global-functions: $FetchHuge: handle missing file
This should not happen, as download was supposed to be
successful - it does. 🤪
2025-12-25 23:56:00 +01:00
Christian Hesse
222404535b netwatch-dns: drop declaration of unused function 2025-12-10 16:29:20 +01:00
Christian Hesse
c697c321e6 netwatch-dns: drop early check...
... as the later check should handle that just fine.
2025-12-09 21:48:16 +01:00
Christian Hesse
96896c37e5 netwatch-dns: update wording to reflect the extra check 2025-12-08 09:36:03 +01:00
Christian Hesse
6e37bab481 netwatch-dns: add active check to keep DoH server 2025-12-08 09:33:07 +01:00
Christian Hesse
28b00e23a1 check-routeros-update: $DoUpdate: drop message...
... as it's either not shown anyway (when rebooting already),
`packages-update` gives reasonable output, or it is simply wrong (when
`packages-update` failed).
2025-12-05 12:02:29 +01:00
Christian Hesse
830693df79 global-functions: $SymbolByUnicodeName: extend special 2025-12-03 17:53:31 +01:00
Christian Hesse
240decf419 check-perpetual-license: cross-mark on already expired license 2025-12-03 15:43:58 +01:00
Christian Hesse
c0678f0501 INITIAL-COMMANDS: add missing space 2025-12-01 11:25:28 +01:00
Christian Hesse
73350ff3f4 README: add missing space 2025-12-01 11:25:00 +01:00
Christian Hesse
7caaa62321 check-perpetual-license: add scroll symbol in notification
doc/check-perpetual-license.d/notification-01-warn.avif
----- >8 -----
[rsc] 📜⚠️ License about to expire!

Your license failed to renew and is about to expire on 2025-09-13 12:12:23 on rsc...
----- >8 -----

doc/check-perpetual-license.d/notification-02-renew.avif
----- >8 -----
[rsc] 📜️ License renewed

Your license was successfully renewed on rsc. It is now valid until 2025-10-25 08:42:46.
----- >8 -----
2025-11-27 11:26:04 +01:00
Christian Hesse
1f11f72d18 global-functions: $SymbolByUnicodeName: add special with magic 2025-11-27 08:49:56 +01:00
Christian Hesse
daeb173dbc doc/check-routeros-update: add screenshot from terminal 2025-11-25 18:44:52 +01:00
Christian Hesse
4acbd6449e Merge branch 'notifications' into next 2025-11-25 17:37:00 +01:00
Christian Hesse
9db7f4494c doc/sms-forward: update notifications
doc/sms-forward.d/notification.avif
----- >8 -----
[rsc] 📨️ SMS Forwarding from 7277

Received this message by rsc from 7277:

📨️ On 2025-08-20 01:01:15+02:00 type class-0:
Welcome to our network!
----- >8 -----
2025-11-25 17:37:00 +01:00
Christian Hesse
2d0c79160d doc/netwatch-notify: update notifications
doc/netwatch-notify.d/notification-01-down.avif
----- >8 -----
[rsc] ️ Netwatch Notify: ipv6.eworm.de down

The host 'ipv6.eworm.de' (2a01:4f8:222:1e83::80, ipv6.eworm.de) is down since 2025-11-18 11:33:18.
----- >8 -----

doc/netwatch-notify.d/notification-02-up.avif
----- >8 -----
[rsc] ️ Netwatch Notify: ipv6.eworm.de up

The host 'ipv6.eworm.de' (2a01:4f8:222:1e83::80, ipv6.eworm.de) is up since 2025-11-18 11:43:15.
It was down for 10 checks since 2025-11-18 11:33:18.
----- >8 -----
2025-11-25 17:37:00 +01:00
Christian Hesse
b6e72f9a9f doc/log-forward: update notifications
doc/log-forward.d/notification-01-info.avif
----- >8 -----
[rsc] 📝️ Log Forwarding

The log on rsc contains these 2 messages after 00:01:19 uptime.

ℹ️ 2025-11-20 16:40:25 system;info router rebooted by ssh:eworm@10.10.0.37
ℹ️ 2025-11-20 16:40:27 script;info global-functions: Loaded on hAP ax^2 with RouterOS 7.20.4 (stable).
----- >8 -----

doc/log-forward.d/notification-02-warn.avif
----- >8 -----
[rsc] 📝⚠️ Log Forwarding

The log on rsc contains these 3 messages after 01:23:19 uptime.

🟠️ 2025-11-20 17:35:48 dhcp;warning dhcp offering lease 192.168.2.254 for 02:00:BA:DC:AB:1E without success
🔴️ 2025-11-20 17:35:57 dhcp;error pool6 refused acquire: bad preferred prefix! (1)
ℹ️ 2025-11-20 17:36:25 system;info;account user eworm logged in from 10.10.0.37 via ssh
----- >8 -----
2025-11-25 17:37:00 +01:00
Christian Hesse
1b53b52ac6 doc/daily-psk: update notifications
doc/daily-psk.d/notification.avif
----- >8 -----
[rsc] 📅️ daily PSK Guest-Wifi

This is the daily PSK on rsc:

SSID:   Guest-Wifi
PSK:    53cr3t5tr1ng
Date:   2025-11-24

A client device specific rule must not exist!

🔗https://www.eworm.de/cgi-bin/cqrlogo-wifi.cgi?scale=8&ssid=Guest-Wifi&pass=53cr3t5tr1ng
----- >8 -----
2025-11-25 17:37:00 +01:00
Christian Hesse
f77cc07338 doc/collect-wireless-mac: update notifications
doc/collect-wireless-mac.d/notification.avif
----- >8 -----
[rsc] 📱️ 02:00:C0:FF:EE:00 connected to Guest-Wifi

A device with unknown MAC address connected to Guest-Wifi on rsc.

Controller:     rsc
Interface:      wifi1-guest
SSID:           Guest-Wifi
MAC:            02:00:C0:FF:EE:00
Vendor:         locally administered
Hostname:       Wifi-Client
Address:        192.168.1.244
DNS name:       02-00-C0-FF-EE-00.dhcp-guest.rsc.eworm.de
                Wifi-Client.dhcp-guest.rsc.eworm.de
Date:           2025-11-23 15:30:27
----- >8 -----
2025-11-25 17:37:00 +01:00
Christian Hesse
094215aec7 doc/check-routeros-update: update notifications
doc/check-routeros-update.d/notification-01-found.avif
----- >8 -----
[rsc] ️ RouterOS update: 7.20.4

A new RouterOS version 7.20.4 is available for rsc.

Hostname:       rsc
Hardware:
    Board:      hAP ax^2
    Arch:       arm64
    Model:      C52iG-5HaxD2HaxD
    Serial:     HEG08Q4FT32
    License:    level 4
RouterOS:
    Channel:    stable
    Installed:  7.20.2
    Available:  7.20.4
RouterOS-Scripts:
    Commit:     main/3287/699be25b
    Version:    138

🔗https://mikrotik.com/download/changelogs/stable-release-tree
----- >8 -----

doc/check-routeros-update.d/notification-02-neighbor.avif
----- >8 -----
[rsc] ️ RouterOS update: 7.20.4

Seen a neighbor (MikroTik) running version 7.20.4 from stable, updating on rsc...

🔗https://mikrotik.com/download/changelogs/stable-release-tree
----- >8 -----
2025-11-25 17:37:00 +01:00
Christian Hesse
d60ee59e77 doc/check-perpetual-license: update notifications
doc/check-perpetual-license.d/notification-01-warn.avif
----- >8 -----
[rsc] ⚠️ License about to expire!

Your license failed to renew and is about to expire on 2025-09-13 12:12:23 on rsc...
----- >8 -----

doc/check-perpetual-license.d/notification-02-renew.avif
----- >8 -----
[rsc] ️ License renewed

Your license was successfully renewed on rsc. It is now valid until 2025-10-25 08:42:46.
----- >8 -----
2025-11-25 17:37:00 +01:00
Christian Hesse
3926d12070 doc/check-lte-firmware-upgrade: update notifications
doc/check-lte-firmware-upgrade.d/notification.avif
----- >8 -----
[rsc] ️ LTE firmware upgrade

A new firmware version 16121.1034.00.01.01.10 is available for LTE interface lte on rsc.

Model:          FG621-EA
Revision:       16121.1034.00.01.01.09
Firmware version:
    Installed:  16121.1034.00.01.01.09
    Available:  16121.1034.00.01.01.10
----- >8 -----
2025-11-25 17:37:00 +01:00
Christian Hesse
5dbd419d1a doc/check-health: update notifications
doc/check-health.d/notification-01-cpu-utilization-high.avif
----- >8 -----
[rsc] 🧮📈️ Health warning: CPU utilization

The average CPU utilization on rsc is at 79%!
----- >8 -----

doc/check-health.d/notification-02-cpu-utilization-ok.avif
----- >8 -----
[rsc] 🧮📉️ Health recovery: CPU utilization

The average CPU utilization on rsc decreased to 64%.
----- >8 -----

doc/check-health.d/notification-03-ram-utilization-high.avif
----- >8 -----
[rsc] 🗃️📈️ Health warning: RAM utilization

The RAM utilization on rsc is at 88%!

total:  64.0MiB
used:   56.7MiB
free:   7.25MiB
----- >8 -----

doc/check-health.d/notification-04-ram-utilization-ok.avif
----- >8 -----
[rsc] 🗃️📉️ Health recovery: RAM utilization

The RAM utilization on rsc decreased to 75%.
----- >8 -----

doc/check-health.d/notification-05-voltage.avif
----- >8 -----
[rsc] 📉️ Health warning: voltage

The voltage on rsc jumped more than 10%.

old value:  23.8V
new value:  16.2V
----- >8 -----

doc/check-health.d/notification-06-temperature-high.avif
----- >8 -----
[rsc] 🔥️ Health warning: cpu-temperature

The cpu-temperature on rsc is above threshold: 74°C
----- >8 -----

doc/check-health.d/notification-07-temperature-ok.avif
----- >8 -----
[rsc] ️ Health recovery: cpu-temperature

The cpu-temperature on rsc dropped below threshold: 64°C
----- >8 -----

doc/check-health.d/notification-08-state-fail.avif
----- >8 -----
[rsc] ️ Health warning: psu2-state

The device 'psu2-state' on rsc failed!
----- >8 -----

doc/check-health.d/notification-09-state-ok.avif
----- >8 -----
[rsc] ️ Health recovery: psu2-state

The device 'psu2-state' on rsc recovered!
----- >8 -----
2025-11-25 17:37:00 +01:00
Christian Hesse
ac6aefd34c doc/check-certificates: update notifications
doc/check-certificates.d/notification-01-warn.avif
----- >8 -----
[rsc] 🔏⚠️ Certificate warning: rsc.eworm.de

A certificate on rsc is about to expire.

Name:           rsc.eworm.de
CommonName:     rsc.eworm.de
SubjectAltNames:
                DNS:rsc.eworm.de
Private key:    available
Fingerprint:    f21bd7e64eef82b963938fecd07ab0210194129d7829ba08c2d212d063f3b07c
Issuer chain:   E7 -> ISRG Root X2
Validity:
    from:       2025-09-09 13:30:10
    to:         2025-12-07 13:30:09
Expires in:     1w 3d 11:37:06
----- >8 -----

doc/check-certificates.d/notification-02-renew.avif
----- >8 -----
[rsc] 🔏️ Certificate renewed: rsc.eworm.de

A certificate on rsc has been renewed.

Name:           rsc.eworm.de
CommonName:     rsc.eworm.de
SubjectAltNames:
                DNS:rsc.eworm.de
Private key:    available
Fingerprint:    f21bd7e64eef82b963938fecd07ab0210194129d7829ba08c2d212d063f3b07c
Issuer chain:   E7 -> ISRG Root X2
Validity:
    from:       2025-11-07 13:30:09
    to:         2026-02-05 13:30:08
Expires in:     11w 3d 02:25:23
----- >8 -----
2025-11-25 17:37:00 +01:00
Christian Hesse
518a4c329f doc/backup-upload: update notifications
doc/backup-upload.d/notification.avif
----- >8 -----
[rsc] 💾⬆️ Backup & Config upload

Backup and config export upload for rsc.

Hostname:       rsc
Hardware:
    Board:      hAP ax^2
    Arch:       arm64
    Model:      C52iG-5HaxD2HaxD
    Serial:     HEG08Q4FT32
    License:    level 4
RouterOS:
    Channel:    stable
    Installed:  7.20.4
RouterOS-Scripts:
    Commit:     main/3287/699be25b
    Version:    138

Backup file:
    name:       rsc-eworm-de.backup
    size:       372kiB
Export file:
    name:       rsc-eworm-de.rsc
    size:       377kiB
Config file:
    name:       rsc-eworm-de.conf
    size:       3.26kiB
----- >8 -----
2025-11-25 17:37:00 +01:00
Christian Hesse
9ef3ba5479 doc/backup-cloud: update notifications
doc/backup-cloud.d/notification.avif
----- >8 -----
[rsc] 💾☁️ Cloud backup

Uploaded backup for rsc to cloud.

Hostname:       rsc
Hardware:
    Board:      hAP ax^2
    Arch:       arm64
    Model:      C52iG-5HaxD2HaxD
    Serial:     HEG08Q4FT32
    License:    level 4
RouterOS:
    Channel:    stable
    Installed:  7.20.4
RouterOS-Scripts:
    Commit:     main/3287/699be25b
    Version:    138

Name:           cloud-20251124-092255
Size:           180kiB
Download key:   lteX51vlEnrV4OSXfUngu8d
----- >8 -----
2025-11-25 17:37:00 +01:00
Christian Hesse
84c49c0f7e README: update notifications
README.d/notification-news-and-changes.avif
----- >8 -----
[rsc] 📌️ News and configuration changes

The configuration version on thyone increased to 138, current configuration may need modification. Please review and update global-config-overlay, then re-run global-config.

Changes:
 📌️ Added support to send notifications via Gotify (gotify.net).
 📌️ RouterOS 7.19 is suffering an issue with certificate store. Fixing trust state for all certificates...
----- >8 -----
2025-11-25 17:28:26 +01:00
Christian Hesse
bc174d7f1f general/style: add a margin to notification when floating 2025-11-25 17:23:01 +01:00
Christian Hesse
678fc3307e general/style: clear floating on hr 2025-11-25 17:23:01 +01:00
Christian Hesse
1ac0147fce sms-forward: mark every message with an envelope 2025-11-25 17:23:01 +01:00
Christian Hesse
1f6c43d5ce check-certificates: show lock-with-ink-pen symbol in notification...
... also for warning, but of course keep the warning sign.
2025-11-25 17:23:01 +01:00
Christian Hesse
544e8094de contrib/notification: increase font size for heading 2025-11-25 17:23:01 +01:00
Christian Hesse
d4979146f9 contrib/notification: disable the border-radius for logo 2025-11-25 17:23:01 +01:00
Christian Hesse
ca487376d6 contrib/notification: use rsc.eworm.de for default link 2025-11-25 17:23:01 +01:00
Christian Hesse
ea9e843ae9 contrib/html: add a class for code...
... and make sure the notification generator does not suffer
strange styles.
2025-11-25 17:23:01 +01:00
Christian Hesse
94514a7c75 doc/check-routeros-update: update the forum link 2025-11-25 17:23:01 +01:00
Christian Hesse
699be25b64 general/clipboard: use textContent...
... and avoid having html entity encoded characters in clipboard.
2025-11-20 20:44:56 +01:00
Christian Hesse
79c98a4b3a Merge branch 'screenshots' into next 2025-11-20 15:36:23 +01:00
Christian Hesse
e49f68c1f2 doc/mod/notification-matrix: update screenshots, with terminal window 2025-11-20 15:33:53 +01:00
Christian Hesse
2f4e83990a doc/mod/scriptrunonce: update screenshot, with terminal window 2025-11-20 15:33:53 +01:00
Christian Hesse
77dc0565a9 doc/mod/inspectvar: update screenshot, with terminal window 2025-11-20 15:32:56 +01:00
Christian Hesse
564c7f6bbc doc/mod/ipcalc: update screenshots, with terminal window 2025-11-20 15:31:40 +01:00
Christian Hesse
6718b90780 doc/mod/notification-telegram: update screenshot, with terminal window 2025-11-20 15:31:40 +01:00
Christian Hesse
e6faf346c2 doc/accesslist-duplicates: update screenshot, with terminal window 2025-11-20 14:58:39 +01:00
Christian Hesse
295fa3144a README: update screenshots, with terminal window
Started xterm with:

    xterm -xrm 'XTerm.vt100.allowTitleOps: false' -T 'Terminal: rsc.eworm.de'
2025-11-20 14:07:21 +01:00
Christian Hesse
b65f3512d0 README: add scheduler with start-time=startup 2025-11-20 14:03:00 +01:00
Christian Hesse
8a904dadf4 contrib/notification: add the copyright notice in footer 2025-11-20 11:53:55 +01:00
Christian Hesse
fa64e8906b contrib/logo-color: add the copyright notice in footer 2025-11-20 11:53:27 +01:00
Christian Hesse
2feaaf36b2 README: highlight the long way for first time users with hint 2025-11-20 11:26:59 +01:00
Christian Hesse
30743c0e87 README: mention broken installation for initial commands 2025-11-20 11:26:59 +01:00
Christian Hesse
725eb834f4 README: link the long way in detail 2025-11-20 11:26:59 +01:00
Christian Hesse
b97a434a9c Makefile: also clean contrib 2025-11-20 11:26:59 +01:00
Christian Hesse
70675a9fee contrib/Makefile: add target clean 2025-11-20 11:26:59 +01:00
Christian Hesse
e0b12a9050 contrib/static-html: add badges 2025-11-20 11:26:59 +01:00
Christian Hesse
a64e9bed80 contrib/static-html: find static html files by comment 2025-11-20 11:26:59 +01:00
Christian Hesse
e10455fb18 contrib/static-html: split off from Makefile 2025-11-20 11:26:59 +01:00
Christian Hesse
ed9dee3c5f contrib/html: simplify handling of relative paths 2025-11-20 11:26:59 +01:00
Christian Hesse
4f778cb1c6 general/clipboard: add a visual feedback 2025-11-20 11:26:59 +01:00
Christian Hesse
a61fbfb75c general/style: add a "📋 Copy!" hint to code blocks 2025-11-20 11:26:59 +01:00
Christian Hesse
903a3f44a0 contrib/html: support click on code block to copy to clipboard 2025-11-20 11:26:59 +01:00
Christian Hesse
638258000b contrib/commitinfo: support updating the commit info 2025-11-20 11:26:59 +01:00
Christian Hesse
b285f2c5d2 global-functions: add and fix global scheduler automatically...
... and also adjust README and INITIAL-COMMANDS.
2025-11-20 11:26:59 +01:00
Christian Hesse
93eb218589 global-functions: $FetchUserAgentStr: add commit info in user agent string 2025-11-20 11:26:59 +01:00
Christian Hesse
45e2f7b0a8 Merge branch 'rsc-eworm-de' into next 2025-11-20 11:26:59 +01:00
Christian Hesse
b29f3535b6 Merge branch 'contrib-template' into next 2025-11-20 11:26:59 +01:00
Christian Hesse
fa9c4be576 doc/mod/scriptrunonce: get script from rsc.eworm.de 2025-11-20 11:26:59 +01:00
Christian Hesse
ce37544bae contrib/logo-color: drop width & height properties for images 2025-11-20 11:26:59 +01:00
Christian Hesse
aeca778284 contrib/template-wifi: split off from Makefile 2025-11-20 11:26:59 +01:00
Christian Hesse
af5f01a973 INITIAL-COMMANDS: install from rsc.eworm.de 2025-11-20 11:26:59 +01:00
Christian Hesse
0b7528db99 contrib/logo-color: place screenshots below each other...
... not side by side.
2025-11-20 11:26:59 +01:00
Christian Hesse
54612e333f contrib/template-local: split off from Makefile 2025-11-20 11:26:59 +01:00
Christian Hesse
05f0838119 README: install from rsc.eworm.de 2025-11-20 11:26:59 +01:00
Christian Hesse
c6451c87f1 general/style: make the blockquote darker 2025-11-20 11:26:59 +01:00
Christian Hesse
4935c81bd9 contrib/template-capsman: split off from Makefile 2025-11-20 11:26:59 +01:00
Christian Hesse
d12be8f1ac fw-addr-lists.d/allow: use rsc.eworm.de in the list 2025-11-20 11:26:59 +01:00
Christian Hesse
c4a060c3d4 Merge branch 'contrib-html-head-foot' into next 2025-11-20 11:26:59 +01:00
Christian Hesse
f3afee3e4b fw-addr-lists.d/{allow,block}: use short url rsc.eworm.de 2025-11-20 11:26:59 +01:00
Christian Hesse
82587ec589 contrib/html: add copyright notice in footer 2025-11-20 11:26:59 +01:00
Christian Hesse
edd51ca719 contrib/html: add a footer with date and version info 2025-11-20 11:23:45 +01:00
Christian Hesse
d1fa3facfd Makefile: clean up and add phony targets 2025-11-20 10:57:20 +01:00
Christian Hesse
b4e6cc5b59 contrib/notification: add a head with eworm, QR code and caption 2025-11-20 10:57:20 +01:00
Christian Hesse
9287996b74 Merge branch 'contrib-html' into next 2025-11-20 10:57:20 +01:00
Christian Hesse
75692abf47 contrib/logo-color: add a head with eworm, QR code and caption 2025-11-20 10:57:20 +01:00
Christian Hesse
7b45bb5b46 contrib/Makefile: hide the hint on broken site 2025-11-20 10:57:20 +01:00
Christian Hesse
165d7c60d4 contrib/html: add a head with eworm, QR code and caption 2025-11-20 10:57:20 +01:00
Christian Hesse
b16c2f5b90 contrib/notification: hint on possibly broken site 2025-11-20 10:57:20 +01:00
Christian Hesse
cbb0aba1b1 contrib/logo-color: hint on possibly broken site 2025-11-20 10:57:20 +01:00
Christian Hesse
1ce3160933 contrib/html: hide the hint on broken link 2025-11-20 10:57:20 +01:00
Christian Hesse
607a608502 doc/mod/notification-telegram: hint on possibly broken link 2025-11-20 10:57:20 +01:00
Christian Hesse
148d40e18d contrib: introduce Makefile...
... and update references in links.
2025-11-20 10:57:20 +01:00
Christian Hesse
036c6ef682 contrib/logo-color: use relative reference in link
... without extra path elements.

This may break, depending on site.
2025-11-20 10:57:20 +01:00
Christian Hesse
5986894749 doc/mod/notification-telegram: use relative reference in link
This may break, depending on site.
2025-11-20 10:57:20 +01:00
Christian Hesse
8d68f24095 contrib/notification: format the values italic 2025-11-20 10:57:20 +01:00
Christian Hesse
eb89f8359b contrib/notification: update date format 2025-11-20 10:57:20 +01:00
Christian Hesse
8faf4ab7cf contrib/{logo-color,notification}: add navigation structure 2025-11-20 10:57:20 +01:00
Christian Hesse
ceb6f2353e contrib/*: unify html code 2025-11-20 10:57:20 +01:00
Christian Hesse
719b662b76 contrib/html: drop ampersand, comma, dash, exclamation mark, ...
... parentesis & tick mark from id/anchor
2025-11-20 10:57:20 +01:00
Christian Hesse
cbb282746f README: add a sub-section for code hosting 2025-11-20 09:48:35 +01:00
Christian Hesse
2e0787afd1 contrib/html: properly handle anchors 2025-11-20 09:48:35 +01:00
Christian Hesse
a0399216fc contrib/html: link the logo with relative path 2025-11-20 09:48:35 +01:00
Christian Hesse
2d6fdc355e contrib/html: increase default line height 2025-11-20 09:48:35 +01:00
Christian Hesse
fae8dbd8ea contrib/html: add a margin on left and right...
... for windows in landscape (wider than high). Also make the
notification float right for landscape only.
2025-11-20 09:48:35 +01:00
Christian Hesse
a2d6671cf0 contrib/html: include stylesheet via link 2025-11-20 09:48:35 +01:00
Christian Hesse
d610bf3582 contrib/{logo-color,notification}: use a single style 2025-11-20 09:48:35 +01:00
Christian Hesse
97b4a41f23 contrib/html: add empty lines...
... for easier rebasing.
2025-11-20 09:48:35 +01:00
Christian Hesse
a2250a00e6 README: add the upstream url verbatim 2025-11-19 16:19:59 +01:00
Christian Hesse
c6cc8b9a51 README: move the QR code 2025-11-19 16:19:59 +01:00
Christian Hesse
5075701958 Merge branch 'builtin-trust-store' into next 2025-11-19 16:19:59 +01:00
Christian Hesse
8f6a38f299 mod/notification-email: remove schedule with find...
... as a race condition could occur and the scheduler is already gone.
2025-11-19 16:19:59 +01:00
Christian Hesse
cc5aea22b3 doc/mod/notification-matrix: define certificate use 2025-11-19 16:19:59 +01:00
Christian Hesse
d002d1c0c0 global-functions: $ScriptInstallUpdate: extra actions on 'not found' only 2025-11-19 16:19:59 +01:00
Christian Hesse
737a872a5f CERTIFICATES: define certificate use 2025-11-19 16:19:59 +01:00
Christian Hesse
298a43a871 global-functions: $ScriptInstallUpdate: either or...
... but not both.
2025-11-19 16:19:59 +01:00
Christian Hesse
335bfc0a88 update-tunnelbroker: define certificate use 2025-11-19 16:19:59 +01:00
Christian Hesse
20885c4620 global-functions: $ScriptInstallUpdate: give hint on ignore
Fixes: https://github.com/eworm-de/routeros-scripts/issues/112
2025-11-19 16:19:59 +01:00
Christian Hesse
5ccb0d07b1 telegram-chat: define certificate use 2025-11-19 16:19:59 +01:00
Christian Hesse
7d701483d3 contrib/checksums: output to stdout...
... and let the Makefile redirect.
2025-11-19 16:19:59 +01:00
Christian Hesse
7772fbb22d netwatch-dns: define certificate use 2025-11-19 16:19:59 +01:00
Christian Hesse
83b164d511 global-functions: $CertificateDownload: drop unused function 2025-11-19 16:19:59 +01:00
Christian Hesse
f0910a4472 mod/notification-telegram: define certificate use 2025-11-19 16:19:59 +01:00
Christian Hesse
090f25a82d check-certificates: add missing semicolon 2025-11-19 16:19:59 +01:00
Christian Hesse
8ff34a2408 mod/notification-ntfy: define certificate use 2025-11-19 16:19:59 +01:00
Christian Hesse
affb9b3baf doc/mode-button: create code block with indention 2025-11-19 16:19:59 +01:00
Christian Hesse
87787eefe3 fw-addr-lists: define certificate use 2025-11-19 16:19:59 +01:00
Christian Hesse
677b5b8069 doc/mod/ssh-keys-import: create code block with indention 2025-11-19 16:19:59 +01:00
Christian Hesse
876505c36d check-certificates: define certificate use 2025-11-19 16:19:59 +01:00
Christian Hesse
b5a0269667 global-functions: $ScriptInstallUpdate: define certificate use 2025-11-19 16:19:59 +01:00
Christian Hesse
f3e6e152bc global-functions: $GetMacVendor: define certificate use 2025-11-19 16:19:59 +01:00
Christian Hesse
8eb397f79f global-functions: $DownloadPackage: define certificate use 2025-11-19 16:19:59 +01:00
Christian Hesse
db0a5bf33c global-functions: $CertificateAvailable: support new builtin-trust-store...
... which was introduced with RouterOS 7.21beta7.
2025-11-19 16:19:59 +01:00
Christian Hesse
fbfeea3042 INITIAL-COMMANDS: support new builtin-trust-store...
... which was introduced with RouterOS 7.21beta7.
2025-11-19 16:19:59 +01:00
Christian Hesse
1a1399d302 README: support new builtin-trust-store...
... which was introduced with RouterOS 7.21beta7.
2025-11-19 16:19:59 +01:00
Christian Hesse
335266f247 README: update the screenshot for script update...
... to match commit 2c92c78b46.
2025-11-19 16:19:47 +01:00
Christian Hesse
d100cac9ed README: add a line break before command 2025-11-13 12:03:37 +01:00
Christian Hesse
c88953e44d README: fix typo
We had it there since 39d1027d697c09ec709a1b847a185ccff3b00540... 😜
2025-11-07 22:11:25 +01:00
Christian Hesse
20987221d9 mod/notification-email: ignore errors (for now...)
Errors are returned since RouterOS 7.21beta2.

We keep the current logic for now, as we want to support older
RouterOS versions. This is something to be reworked later...
2025-10-26 19:19:13 +01:00
Christian Hesse
ea4b5553c2 Merge branch 'netmask6' into next
This branch is a follow-up on 9ceed0926a
with clean solution. Read on for details...

The data type `ip6-prefix` used to hold what it was named for - an IPv6
prefix:

    [user@mikrotik] > :put 2001:db8::dead:beef/32
    2001:db8::/32

This changed with RouterOS 6.21beta2, which now allows that exact same
data type to hold something like "address with prefix length attached":

    [user@mikrotik] > :put 2001:db8::dead:beef/32
    2001:db8::dead:beef/32

My scripts (namely `fw-addr-lists`) relied on the old behaviour and broke.
The commit mentioned above was just a quick workaround, with rough edges,
and it could still fail.

Sadly RouterOS does not support bit shifting on IPv6 data types, so a
(completely) mathematical solution is out of scope.

This branch implements a new and better workaround, see the first commit
of branch (6ad6f9aa08) for details.

I opened a support ticket / feature request on this topic, let's see
what results it brings...

https://help.mikrotik.com/servicedesk/servicedesk/customer/portal/1/SUP-201881
2025-10-22 19:05:38 +02:00
Christian Hesse
b80b872e55 mod/ipcalc: support IPv6
Well, some of these values do not make a lot of sense for IPv6...
Something to be cleaned up later.
2025-10-19 19:55:12 +02:00
Christian Hesse
ea05b69f7c fw-addr-lists: use $NetMask6 2025-10-19 19:55:12 +02:00
Christian Hesse
d7a6eb1d00 global-functions: $NetMask6: implement simple caching
The calculation is quite complex for something that needs to be done
frequently, for example by `fw-addr-lists`. The number of possible
netmasks is limited, so let's cache the results that were calculated
already.
2025-10-19 19:52:42 +02:00
Christian Hesse
6ad6f9aa08 global-functions: introduce $NetMask6
RouterOS does not support bit shifting on IPv6 data types, so we have to
split the problem:

 * each 16 bit block is calculated separately, as number
 * the complete netmask is assembled in a loop, as string
 * the final string is casted to correct data type
2025-10-19 19:48:14 +02:00
Christian Hesse
c62f236251 Merge branch 'netmask4' into next 2025-10-19 19:26:51 +02:00
Christian Hesse
47309e5c03 fw-addr-lists: normalize IPv4 addresses 2025-10-16 15:43:43 +02:00
Christian Hesse
9fa11cb79a mod/ipcalc: use $NetMask4 2025-10-16 13:03:54 +02:00
Christian Hesse
def540c965 global-functions: introduce $NetMask4 2025-10-16 10:47:19 +02:00
Christian Hesse
025b492783 global-functions: remove trailing space 2025-10-16 10:34:09 +02:00
Christian Hesse
6630d35eea mod/notification-telegram: $FlushTelegramQueue: check for cert, again
Chances are that messages have been queued before system was fully up or
connected. Thus the certificate may be missing, and it should be checked
again for on flush.
2025-10-13 12:06:01 +02:00
Christian Hesse
c81618b571 log-forward: always use memo symbol...
... and add warning sign on top.
2025-10-09 09:22:39 +02:00
Christian Hesse
35b556f0b2 fw-addr-lists: calculate branch after post-processing...
... as branch will likely change, and we want to avoid duplicates. 😉
2025-10-08 18:43:06 +02:00
Christian Hesse
9ceed0926a fw-addr-lists: do not use IPv6 net addresses smaller /64
This should reduce the number of addresses in list by aggregating them,
and also fix addresses with host part set (like 2001:470:1:fb5::2a0/64,
which should be 2001:470:1:fb5::/64 really).

The latter caused new warnings with RouterOS 7.21beta2.
2025-10-08 18:43:06 +02:00
Christian Hesse
5ffa85f8bf mod/ssh-keys-import: handle new parameter
With RouterOS 7.21beta2 the user SSH keys "key-owner" field was
renamed to "info".

Either of both is displayed in red by syntax highlighting, but it
works anyway.
2025-10-08 18:42:26 +02:00
Christian Hesse
48d0f1f0b9 fw-addr-lists: check last character of line for JSON
This is not a proof, but a line also ending with a curly bracket
has higher probability of being valid JSON.

Better safe than sorry... We are suffering a CVE in RouterOS:
https://www.cve.org/CVERecord?id=CVE-2025-10948
2025-10-02 11:51:08 +02:00
Christian Hesse
a931cb61a0 packages-update: fix condition when checking for scheduler
This broke with commit 6b0c9ab17d2e7e3693cebf281e5300d1e4de3446...
2025-09-30 10:02:20 +02:00
Christian Hesse
14b51d96b0 generate valid HTML, including head & style 2025-09-25 10:25:20 +02:00
Miquel Bonastre
2c715096b9 mod/ssh-keys-import: $SSHKeysImportFile: fix file exists condition...
... which broke in commit 80aed200fd.
2025-09-25 10:24:07 +02:00
Christian Hesse
2773fef9d8 global-functions: $WaitForFile: try less expensive operation
Checking a specific file is less expensive operation than finding one,
especially when on hardware with huge storage and lots of files (like
RDS). We have to keep the find command in the latter loop, though.
2025-09-25 10:24:07 +02:00
Christian Hesse
6b0c9ab17d packages-update: exit early if scheduler exists 2025-09-15 13:18:30 +02:00
Christian Hesse
59dc7e6d0c Merge branch 'check-health' into next 2025-08-26 09:25:01 +02:00
Christian Hesse
22e6383e86 check-health.d/voltage: use script name for origin in notification 2025-08-25 11:11:07 +02:00
Christian Hesse
62ca30b5d3 check-health.d/temperature: use script name for origin in notification 2025-08-25 11:11:07 +02:00
Christian Hesse
907358cb85 check-health.d/state: use script name for origin in notification 2025-08-25 11:11:07 +02:00
Christian Hesse
2fed8f967b check-health: pass script name to plugin 2025-08-25 11:11:07 +02:00
Christian Hesse
386ea2419f check-health: fix variable name 2025-08-25 11:04:07 +02:00
Christian Hesse
fe080c0d3d global-functions: $CertificateAvailable: properly handle duplicate CN
There are CA certificates with identical CommonName out there... 🤪
Let's handle these.

    [admin@MikroTik] > /certificate/print proplist=common-name,skid where common-name="GlobalSign";
    Flags: T - TRUSTED
    Columns: COMMON-NAME, SKID
    #   COMMON-NAME  SKID
    0 T GlobalSign   8FF04B7FA82E4524AE4D50FA639A8BDEE2DD1BBC
    1 T GlobalSign   3DE629489BEA07CA21444A26DE6EDED283D09F59
    2 T GlobalSign   AE6C05A39313E2A2E7E2D71CD6C7F07FC86753A0
    3 T GlobalSign   54B07BAD45B8E2407FFB0A6EFBBE33C93CA384D5
2025-08-16 23:14:31 +02:00
Christian Hesse
a856d309df global-functions: $SymbolByUnicodeName: allow to add more symbols...
... for example from a module. Add a script `mod/symbols-extra` with
something like:

    :global SymbolsExtra;

    :set ($SymbolsExtra->"rocket") "\F0\9F\9A\80";
2025-07-28 16:47:27 +02:00
Christian Hesse
721e786f68 netwatch-notify: increase the address-list timeout even further 2025-07-21 10:52:22 +02:00
Christian Hesse
4c2c7e817a netwatch-notify: give the number of failures...
... to indicated this happened several times.
2025-07-21 10:47:19 +02:00
Christian Hesse
89175e511f accesslist-duplicates: print without paging 2025-07-07 18:38:21 +02:00
Christian Hesse
b068f86995 netwatch-dns: fix indention 2025-06-25 10:47:12 +02:00
Christian Hesse
d46574b4fe netwatch-dns: retry doh server...
... for more resilience on bad connectivity or saturated link.
2025-06-25 10:30:26 +02:00
Christian Hesse
c3010af4ed Merge branch 'file' into next 2025-06-23 08:52:58 +02:00
Christian Hesse
1307b8587e global-functions: $FileGet: mitigate race with file properties
RouterOS is suffering a race condition, where a file exists, but its
properties are not (yet) available. This is handled in $WaitForFile.

This passes an interval of zero to $WaitForFile, as does not wait for
the file to exist, but wants to avoid the race only.
2025-06-23 08:52:58 +02:00
Christian Hesse
6415849850 global-functions: $WaitForFile: (mostly) revert changes
This (mostly) reverts commits 0e00a228d6
and e08bb2192d.

This is required for RouterOS 7.20beta4. That fixed recursive find for
files, and (again, or still?) suffers timing (and thus racing) issues
getting file properties.

This breaks RouterOS 7.20beta2 again, so that specific version is not
supported. Just update...
2025-06-23 08:52:51 +02:00
Christian Hesse
95f8af6234 packages-update: convert to time before comparing...
... to avoid:

    packages-update: Script 'packages-update' exited with error: Script Error: cannot compare if truth value is more than or equal to ip address
2025-06-20 23:52:07 +02:00
Christian Hesse
de2a90d841 doc/fw-addr-lists: add a warning on possible subsystem crash 2025-06-11 17:47:40 +02:00
Christian Hesse
e2d3f0f073 fw-addr-lists: delay on possible scripting subsystem crash
This happens in :convert when a list is way too large.

Let's use $LogPrintOnce here. If the scripting subsystem really crashes
the message will be purged from $LogPrintOnceMessages anyway (as all
global variables are lost).
2025-06-11 17:46:09 +02:00
Christian Hesse
595b4aea9d capsman-download-packages: revert changes for "new functionality"
(Though we keep the quoting for type.)

Well, turned out this functionality is for `/file/print` only,
but does not work with `/file/find`. 🫣🥴

This reverts commit 15fd522d3d.
2025-06-11 17:46:09 +02:00
Christian Hesse
0de6d006ae update list of contributors 2025-06-04 22:30:51 +02:00
Christian Hesse
1f4bf9ee63 check-routeros-update: remove a stale scheduler 2025-06-04 22:30:51 +02:00
Christian Hesse
c3d3d61f92 packages-update: support deferred reboot with longer interval 2025-06-04 22:30:51 +02:00
Christian Hesse
6130c94cc1 Merge branch 'file' into next 2025-06-04 22:30:51 +02:00
Christian Hesse
15fd522d3d capsman-download-packages: adopt new functionality from file menu 2025-06-04 22:30:51 +02:00
Christian Hesse
5b15c82bb1 capsman-download-packages: use $FileGet ...
... to work around restrictions in new file handling.
2025-06-04 22:30:48 +02:00
Christian Hesse
30b80e903d telegram-chat: use $FileExists ...
... to work around restrictions in new file handling.
2025-06-04 22:30:45 +02:00
Christian Hesse
80aed200fd mod/ssh-keys-import: use $FileExists ...
... to work around restrictions in new file handling.
2025-06-04 22:30:42 +02:00
Christian Hesse
2d81984aed mod/notification-email: use $RmFile 2025-06-04 22:30:42 +02:00
Christian Hesse
e3284ca770 mod/notification-email: use $FileExists ...
... to work around restrictions in new file handling.
2025-06-04 22:30:39 +02:00
Christian Hesse
daee05dbd7 backup-email: add a comment why files are not removed 2025-06-04 22:30:39 +02:00
Christian Hesse
43bac7c33c backup-email: check for .conf file 2025-06-04 22:30:39 +02:00
Christian Hesse
a2f837be59 backup-email: use :retry and $FileExists ...
... to work around restrictions in new file handling.
2025-06-04 22:30:36 +02:00
Christian Hesse
8353a8547f global-functions: $DownloadPackage: use $FileExists ...
... to work around restrictions in new file handling.
2025-06-04 22:30:33 +02:00
Christian Hesse
cb984a5e52 global-functions: introduce $FileExists 2025-06-04 22:28:25 +02:00
Christian Hesse
0e00a228d6 global-functions: $WaitForFile: use :retry for simplification, ...
... and to work around restrictions in new file handling.
2025-06-04 22:28:20 +02:00
Christian Hesse
e08bb2192d global-functions: $WaitForFile: drop the workaround
This was fixed in RouterOS 7.18rc1, so should be ok to remove now.
2025-06-04 22:28:20 +02:00
Christian Hesse
fb8e616846 global-functions: $RmFile: use $FileGet ...
... to work around restrictions in new file handling.
2025-06-04 22:28:17 +02:00
Christian Hesse
d993495e44 global-functions: $RmDir: use $FileGet ...
... to work around restrictions in new file handling.
2025-06-04 22:28:14 +02:00
Christian Hesse
1e4f168735 global-functions: $MkDir: use $FileGet ...
... to work around restrictions in new file handling.
2025-06-04 22:28:11 +02:00
Christian Hesse
b70e6e7984 global-functions: introduce $FileGet 2025-06-03 12:29:42 +02:00
Christian Hesse
4bc3bf40e6 Merge branch 'builtin-certs' into next 2025-06-03 11:06:59 +02:00
Christian Hesse
d69b399572 INITIAL-COMMANDS: use builtin certificates if possible 2025-06-03 11:06:59 +02:00
Christian Hesse
bf684a7197 global-functions: $CertificateAvailable: try to use builtin certificates
The builtin certificates were introduced with RouterOS 7.19, so requires
this hacky :parse workaround.
2025-05-28 15:08:26 +02:00
Christian Hesse
d59c4aee26 README: add a paragraph and link to jump 2025-05-28 14:16:57 +02:00
Christian Hesse
3d3b270748 README: give a hint on builtin certificate store
I guess this should become the default any time in future...
2025-05-28 14:07:57 +02:00
Christian Hesse
6a49c483b6 telegram-chat: rename variable...
... to better describe the use.
2025-05-23 17:38:22 +02:00
Christian Hesse
c50acd697a telegram-chat: fix detection of replies 2025-05-23 17:36:56 +02:00
Christian Hesse
4bd7d44cd2 global-functions: $ScriptInstallUpdate: fix syntax error 2025-05-23 11:16:40 +02:00
Christian Hesse
86ad41f6b6 fix the trust state for certificates
RouterOS 7.19 is suffering an issue with certificate store, where the
trust state is not available correctly. This effects certificates
imported a long time ago, with RouterOS 7.4 or older.

Fixing trust state for all certificates by re-setting the trust state...

(Reported as SUP-188791...)
2025-05-23 10:51:04 +02:00
Christian Hesse
64fe923c5a DEBUG: fix typo 2025-05-22 10:13:52 +02:00
Christian Hesse
f1396b83aa telegram-chat: support debug output for updates in JSON 2025-05-22 10:13:52 +02:00
Christian Hesse
1b5dd1e1d3 telegram-chat: support trusted group chat ids
But be warned: Adding a person to a trusted group will give
her/him administrative control over the device(s) - without
changes on the device itself!

On the other hand... Removing permissions is easily done by removing
a person from a group.

Closes: https://github.com/eworm-de/routeros-scripts/issues/101
2025-05-22 10:13:52 +02:00
Christian Hesse
e78c71948d mod/notification-telegram: fix indention 2025-05-22 10:13:52 +02:00
Christian Hesse
ce129ee441 fw-addr-lists: for IPv6 the CIDR is always expected 2025-05-22 10:13:52 +02:00
Christian Hesse
2a95687477 mod/notification-email: add the link symbol 2025-05-22 10:13:52 +02:00
Christian Hesse
74dc809b98 mod/notification-email: properly truncate the body
Truned out that the size limit for e-mail message/body is anywhere just
below 64kB... So truncate  at about 62.000 bytes.
2025-05-22 10:13:52 +02:00
Christian Hesse
ff218e4ce5 mod/notification-email: add error handling when sending mail 2025-05-22 10:13:52 +02:00
Christian Hesse
bd3cc3bbd4 mod/inspectvar: replace only when matching 2025-05-22 10:13:52 +02:00
Christian Hesse
36f155ce62 mod/inspectvar: remove CR, replace LF 2025-05-22 10:13:52 +02:00
Christian Hesse
187735f35f mod/inspectvar: print the length for strings 2025-05-22 10:13:52 +02:00
Christian Hesse
3521995dbc mod/inspectvar: use $CharacterMultiply 2025-05-22 10:13:52 +02:00
Christian Hesse
1f4290f4be Merge branch 'onerror' into next 2025-05-22 10:13:52 +02:00
Christian Hesse
205bcce6f9 update-tunnelbroker: :do ... on-error=... -> :onerror ... do=... 2025-05-22 10:13:52 +02:00
Christian Hesse
10ac816348 unattended-lte-firmware-upgrade: :do ... on-error=... -> :onerror ... do=... 2025-05-22 10:13:52 +02:00
Christian Hesse
f22d46da96 telegram-chat: :do ... on-error=... -> :onerror ... do=... 2025-05-22 10:13:52 +02:00
Christian Hesse
d0adf9974e sms-forward: :do ... on-error=... -> :onerror ... do=... 2025-05-22 10:13:52 +02:00
Christian Hesse
fefe59751f netwatch-notify: :do ... on-error=... -> :onerror ... do=... 2025-05-22 10:13:52 +02:00
Christian Hesse
a523f97938 netwatch-dns: :do ... on-error=... -> :onerror ... do=... 2025-05-22 10:13:52 +02:00
Christian Hesse
c757064eb9 mod/ssh-keys-import: :do ... on-error=... -> ... well... - fix condition 🥴 2025-05-22 10:13:47 +02:00
Christian Hesse
9cd4ed08a4 mod/ssh-keys-import: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:12:25 +02:00
Christian Hesse
9ae21c00bd mod/scriptrunonce: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:12:25 +02:00
Christian Hesse
314e68e4cd mode-button: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:12:25 +02:00
Christian Hesse
e01873301f mod/notification-gotify: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:12:25 +02:00
Christian Hesse
3f092d3477 mod/notification-matrix: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:12:25 +02:00
Christian Hesse
2a7fd7ea53 mod/notification-ntfy: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:12:25 +02:00
Christian Hesse
5badafe109 mod/notification-telegram: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:12:25 +02:00
Christian Hesse
c1e6348bb9 lease-script: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:12:25 +02:00
Christian Hesse
d5f9ecebfb gps-track: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:12:25 +02:00
Christian Hesse
5c599beae1 global-functions: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:12:25 +02:00
Christian Hesse
8b1b73c936 global-functions: $ValidateSyntax: add debug output 2025-05-21 22:12:25 +02:00
Christian Hesse
f5c4378676 global-functions: $ValidateSyntax: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:12:25 +02:00
Christian Hesse
12926b7c42 global-functions: $ScriptInstallUpdate: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:12:25 +02:00
Christian Hesse
2317013121 global-functions: $RmFile: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:12:25 +02:00
Christian Hesse
86a8919ed2 global-functions: $RmDir: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:12:25 +02:00
Christian Hesse
09f9826760 global-functions: $MkDir: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:12:25 +02:00
Christian Hesse
7a1fef78a2 global-functions: $GetMacVendor: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:12:25 +02:00
Christian Hesse
a6b36dde7b global-functions: $FetchHuge: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:12:25 +02:00
Christian Hesse
5b89f3e425 global-functions: $DownloadPackage: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:12:25 +02:00
Christian Hesse
a9e7bb0a05 global-config: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:12:25 +02:00
Christian Hesse
b807fc9e90 fw-addr-lists: adopt changes in wording...
... to match the changes from previous commit.
2025-05-21 22:12:10 +02:00
Christian Hesse
142b0760b0 fw-addr-lists: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:05:35 +02:00
Christian Hesse
79f681b801 check-routeros-update: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:05:35 +02:00
Christian Hesse
1925d2847c check-lte-firmware-upgrade: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:05:35 +02:00
Christian Hesse
187aeba78b check-health: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:05:35 +02:00
Christian Hesse
dc2296d500 backup-upload: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:05:35 +02:00
Christian Hesse
c3fce37066 backup-partition: :do ... on-error=... -> :onerror ... do=... 2025-05-21 22:05:35 +02:00
Christian Hesse
6691e2e765 global-functions: $DownloadPackage: reverse failure logic...
... and do not retry.
2025-05-21 21:51:16 +02:00
Christian Hesse
01f3cb91e7 sms-forward: add error handling on message removal 2025-05-13 09:22:45 +02:00
Christian Hesse
9085780562 sms-forward: delay after removal...
... to give the SIM card some time to succeed. Removing several messages
one after another fails without this.
2025-05-13 09:22:45 +02:00
Christian Hesse
f095b581e7 global-functions: $ScriptInstallUpdate: set config and functions not ready...
... before reload. This should fix some corner cases where scripts ran
with broken configuration or functions.

Also do reload both - configuration and functions - to simplify the
function.
2025-05-12 12:09:24 +02:00
Christian Hesse
661aad522b global-config: add another visual hint 2025-05-12 12:09:24 +02:00
Christian Hesse
4561b17dbf global-config: add another comment with visual hint 2025-05-12 12:09:24 +02:00
Christian Hesse
39295b4954 Merge branch 'global-config-ready' into next 2025-05-08 09:51:08 +02:00
Christian Hesse
0f58cecc0f global-wait: check for global config to be ready 2025-05-08 09:51:08 +02:00
Christian Hesse
f2dbb9eff3 update-tunnelbroker: check for global config to be ready 2025-05-08 09:51:08 +02:00
Christian Hesse
b4d80d3b17 update-gre-address: check for global config to be ready 2025-05-08 09:51:08 +02:00
Christian Hesse
9b5419b939 telegram-chat: check for global config to be ready 2025-05-08 09:51:08 +02:00
Christian Hesse
15248ffd39 sms-forward: check for global config to be ready 2025-05-08 09:51:08 +02:00
Christian Hesse
6270ac45d8 sms-action: check for global config to be ready 2025-05-08 09:51:08 +02:00
Christian Hesse
194698f53f ppp-on-up: check for global config to be ready 2025-05-08 09:51:08 +02:00
Christian Hesse
38ec392a5f packages-update: check for global config to be ready 2025-05-08 09:51:08 +02:00
Christian Hesse
aaecd1b457 ospf-to-leds: check for global config to be ready 2025-05-08 09:51:08 +02:00
Christian Hesse
5b40380cd2 netwatch-notify: check for global config to be ready 2025-05-08 09:51:08 +02:00
Christian Hesse
2d39dbdf7c netwatch-dns: check for global config to be ready 2025-05-08 09:51:08 +02:00
Christian Hesse
bc1c238158 mode-button: check for global config to be ready 2025-05-08 09:51:08 +02:00
Christian Hesse
160effd91b log-forward: check for global config to be ready 2025-05-08 09:51:08 +02:00
Christian Hesse
10bd9a1cb5 lease-script: check for global config to be ready 2025-05-08 09:51:08 +02:00
Christian Hesse
59f9a1187f ipv6-update: check for global config to be ready 2025-05-08 09:51:08 +02:00
Christian Hesse
ce29fcf49e ipsec-to-dns: check for global config to be ready 2025-05-08 09:51:08 +02:00
Christian Hesse
6a9fced721 hotspot-to-wpa: check for global config to be ready 2025-05-08 09:51:08 +02:00
Christian Hesse
713e63da87 hotspot-to-wpa-cleanup: check for global config to be ready 2025-05-08 09:51:08 +02:00
Christian Hesse
148892694f gps-track: check for global config to be ready 2025-05-08 09:51:08 +02:00
Christian Hesse
9e70bca30b fw-addr-lists: check for global config to be ready 2025-05-08 09:51:08 +02:00
Christian Hesse
a68763c4dd firmware-upgrade-reboot: check for global config to be ready 2025-05-08 09:51:08 +02:00
Christian Hesse
857993cf90 dhcp-to-dns: check for global config to be ready 2025-05-08 09:51:08 +02:00
Christian Hesse
ad6ad5bfcc dhcp-lease-comment: check for global config to be ready 2025-05-08 09:51:08 +02:00
Christian Hesse
be0e9be1ba Merge branch 'global-functions-fail' into next 2025-05-08 09:51:07 +02:00
Christian Hesse
b19c448f78 daily-psk: check for global config to be ready 2025-05-08 09:51:07 +02:00
Christian Hesse
2afe734bc3 Merge branch 'onerror-for-outer-block' into next 2025-05-08 09:51:07 +02:00
Christian Hesse
6040f70b19 update-tunnelbroker: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
286ed96cc3 collect-wireless-mac: check for global config to be ready 2025-05-08 09:51:07 +02:00
Christian Hesse
af40ae82ed mod/ssh-keys-import: use :onerror for outer block 2025-05-08 09:51:07 +02:00
Christian Hesse
87edd0bd29 update-gre-address: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
59c66de690 check-routeros-update: check for global config to be ready 2025-05-08 09:51:07 +02:00
Christian Hesse
5958851bd7 mod/scriptrunonce: use :onerror for outer block 2025-05-08 09:51:07 +02:00
Christian Hesse
35bce7c5eb telegram-chat: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
78463f469b check-perpetual-license: check for global config to be ready 2025-05-08 09:51:07 +02:00
Christian Hesse
f7ba78702f mod/notification-telegram: use :onerror for outer block 2025-05-08 09:51:07 +02:00
Christian Hesse
24ea16cf91 sms-forward: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
506acb748b check-lte-firmware-upgrade: check for global config to be ready 2025-05-08 09:51:07 +02:00
Christian Hesse
e3a15cc6b8 mod/notification-ntfy: use :onerror for outer block 2025-05-08 09:51:07 +02:00
Christian Hesse
0ef8888412 sms-action: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
1936dcb563 check-health: check for global config to be ready 2025-05-08 09:51:07 +02:00
Christian Hesse
d865deb8a8 mod/notification-matrix: use :onerror for outer block 2025-05-08 09:51:07 +02:00
Christian Hesse
7b624faaa1 ppp-on-up: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
4954a88695 check-certificates: check for global config to be ready 2025-05-08 09:51:07 +02:00
Christian Hesse
9d845d40f0 mod/notification-gotify: use :onerror for outer block 2025-05-08 09:51:07 +02:00
Christian Hesse
4358dabb19 packages-update: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
ef1a402c4e certificate-renew-issued: check for global config to be ready 2025-05-08 09:51:07 +02:00
Christian Hesse
862830b341 mod/notification-email: use :onerror for outer block 2025-05-08 09:51:07 +02:00
Christian Hesse
ff812dd192 ospf-to-leds: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
40b19a179d capsman-rolling-upgrade: check for global config to be ready 2025-05-08 09:51:07 +02:00
Christian Hesse
8cddc63767 mod/ipcalc: use :onerror for outer block 2025-05-08 09:51:07 +02:00
Christian Hesse
446aa3d7ff netwatch-notify: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
12037ff6e6 capsman-download-packages: check for global config to be ready 2025-05-08 09:51:07 +02:00
Christian Hesse
9b558ff8a1 mod/inspectvar: use :onerror for outer block 2025-05-08 09:51:07 +02:00
Christian Hesse
2374be9a21 netwatch-dns: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
27fc07e940 backup-upload: check for global config to be ready 2025-05-08 09:51:07 +02:00
Christian Hesse
d5141f43e5 mod/bridge-port-vlan: use :onerror for outer block 2025-05-08 09:51:07 +02:00
Christian Hesse
63606ad25c mode-button: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
200167fa38 backup-partition: check for global config to be ready 2025-05-08 09:51:07 +02:00
Christian Hesse
02986eb77a mod/bridge-port-to: use :onerror for outer block 2025-05-08 09:51:07 +02:00
Christian Hesse
a6ab95ccef log-forward: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
37a6d4cc43 backup-email: check for global config to be ready 2025-05-08 09:51:07 +02:00
Christian Hesse
d2af793683 update-tunnelbroker: use :onerror for outer block 2025-05-08 09:51:07 +02:00
Christian Hesse
829fce789b lease-script: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
d57916fc26 backup-cloud: check for global config to be ready 2025-05-08 09:51:07 +02:00
Christian Hesse
fe3d9f8418 update-gre-address: use :onerror for outer block 2025-05-08 09:51:07 +02:00
Christian Hesse
41b705aa5a ipv6-update: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
60c5e84401 accesslist-duplicates: check for global config to be ready 2025-05-08 09:51:07 +02:00
Christian Hesse
3ad8cafc7a telegram-chat: use :onerror for outer block 2025-05-08 09:51:07 +02:00
Christian Hesse
83cf003f62 ipsec-to-dns: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
bcdb74f31d global-config: introduce a state variable 2025-05-08 09:51:07 +02:00
Christian Hesse
aae9b4d4e3 sms-forward: use :onerror for outer block 2025-05-08 09:51:07 +02:00
Christian Hesse
057bbb8481 hotspot-to-wpa: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
3eec13b8b5 sms-action: use :onerror for outer block 2025-05-08 09:51:07 +02:00
Christian Hesse
76778f0431 hotspot-to-wpa-cleanup: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
aeccd36f16 ppp-on-up: use :onerror for outer block 2025-05-08 09:51:07 +02:00
Christian Hesse
925e7f869e gps-track: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
9a5a2aec4f packages-update: use :onerror for outer block 2025-05-08 09:51:07 +02:00
Christian Hesse
4b92181f2e fw-addr-lists: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
c720eadd2c ospf-to-leds: use :onerror for outer block 2025-05-08 09:51:07 +02:00
Christian Hesse
4d1349125d firmware-upgrade-reboot: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
0df4170a2e netwatch-notify: use :onerror for outer block 2025-05-08 09:51:07 +02:00
Christian Hesse
a308d4269e dhcp-to-dns: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
2d41ad718d netwatch-dns: use :onerror for outer block 2025-05-08 09:51:07 +02:00
Christian Hesse
a556f4c398 dhcp-lease-comment: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
ff03f49724 mode-button: use :onerror for outer block 2025-05-08 09:51:07 +02:00
Christian Hesse
8418d58ff0 daily-psk: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
2712bcb44d collect-wireless-mac: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
69b2af4bd7 check-routeros-update: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
08d78224a0 check-perpetual-license: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
8f1ac6fa17 check-lte-firmware-upgrade: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
96cbb32a4f check-health: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
9b811e1ed2 check-certificates: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
b4188ab1a2 certificate-renew-issued: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
de5aab12ae capsman-rolling-upgrade: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
33393798b1 capsman-download-packages: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
9423d8019a backup-upload: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
bf1b3e3c5e backup-partition: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
64ec962bb6 backup-email: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
7d4e4ec273 backup-cloud: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
9acf9781cb accesslist-duplicates: fail if global functions do not become ready 2025-05-08 09:51:07 +02:00
Christian Hesse
c643069b3e log-forward: use :onerror for outer block 2025-05-06 09:55:07 +02:00
Christian Hesse
da93138017 lease-script: use :onerror for outer block 2025-05-06 09:55:04 +02:00
Christian Hesse
39ab19b272 ipv6-update: use :onerror for outer block 2025-05-06 09:55:01 +02:00
Christian Hesse
1075b6b24e ipsec-to-dns: use :onerror for outer block 2025-05-06 09:54:57 +02:00
Christian Hesse
9ae733a167 hotspot-to-wpa: use :onerror for outer block 2025-05-06 09:54:53 +02:00
Christian Hesse
143b8a8ddc hotspot-to-wpa-cleanup: use :onerror for outer block 2025-05-06 09:54:48 +02:00
Christian Hesse
d609da0041 gps-track: use :onerror for outer block 2025-05-06 09:54:45 +02:00
Christian Hesse
0e93d8ca66 fw-addr-lists: use :onerror for outer block 2025-05-06 09:54:42 +02:00
Christian Hesse
d99380443b firmware-upgrade-reboot: use :onerror for outer block 2025-05-06 09:54:38 +02:00
Christian Hesse
8ed83a311d dhcp-to-dns: use :onerror for outer block 2025-05-06 09:54:35 +02:00
Christian Hesse
5dc6b712e1 dhcp-lease-comment: use :onerror for outer block 2025-05-06 09:54:29 +02:00
Christian Hesse
55e07a8a42 daily-psk: use :onerror for outer block 2025-05-06 09:54:24 +02:00
Christian Hesse
7d8e9fda29 collect-wireless-mac: use :onerror for outer block 2025-05-06 09:54:18 +02:00
Christian Hesse
472dc9289d check-routeros-update: use :onerror for outer block 2025-05-06 09:54:14 +02:00
Christian Hesse
f5c33a9cfb check-perpetual-license: use :onerror for outer block 2025-05-06 09:54:10 +02:00
Christian Hesse
b959f2d941 check-lte-firmware-upgrade: use :onerror for outer block 2025-05-06 09:54:06 +02:00
Christian Hesse
051a1d95e5 check-health: use :onerror for outer block 2025-05-06 09:54:02 +02:00
Christian Hesse
e44a5384b7 check-certificates: use :onerror for outer block 2025-05-06 09:53:59 +02:00
Christian Hesse
009516dbd4 certificate-renew-issued: use :onerror for outer block 2025-05-06 09:53:54 +02:00
Christian Hesse
54a3012e89 capsman-rolling-upgrade: use :onerror for outer block 2025-05-06 09:53:46 +02:00
Christian Hesse
e0ba2c8282 capsman-download-packages: use :onerror for outer block 2025-05-06 09:53:37 +02:00
Christian Hesse
0a9acab040 backup-upload: use :onerror for outer block 2025-05-06 09:53:34 +02:00
Christian Hesse
34c052c5f1 backup-partition: use :onerror for outer block 2025-05-06 09:53:31 +02:00
Christian Hesse
953daca8ac backup-email: use :onerror for outer block 2025-05-06 09:53:28 +02:00
Christian Hesse
02a205b14e backup-cloud: use :onerror for outer block 2025-05-06 09:53:24 +02:00
Christian Hesse
b9faeb86b9 accesslist-duplicates: use :onerror for outer block 2025-05-06 09:53:19 +02:00
Christian Hesse
41bf9677db global-functions: use :onerror for outer block 2025-05-06 09:50:20 +02:00
Christian Hesse
90f61d3d75 global-functions: $ExitError: support to pass in error message 2025-05-06 09:43:57 +02:00
Christian Hesse
ccfe1a781e check-routeros-update: log and print info with scheduler 2025-05-06 09:43:57 +02:00
Christian Hesse
154fb43800 mod/notification-ntfy: drop unused variable 2025-05-03 22:11:22 +02:00
Christian Hesse
fa83c76be1 doc/check-lte-firmware-upgrade: add missing reference for ntfy 2025-05-03 22:11:22 +02:00
Christian Hesse
07541a3cbc update list of contributors 2025-05-03 22:11:22 +02:00
Leonardo David Monteiro
0717ebfbd5 introduce mod/notification-gotify...
... for sending notifications via Gotify (https://gotify.net).

Closes: https://github.com/eworm-de/routeros-scripts/pull/92

Co-authored-by: Christian Hesse <mail@eworm.de>
2025-05-03 22:11:22 +02:00
Christian Hesse
507a520994 Merge branch 'external-links' into next 2025-04-29 10:53:26 +02:00
Christian Hesse
fe64918118 README: add disclaimer on external links 2025-04-29 10:53:26 +02:00
Christian Hesse
3822887ba2 doc/mod/notification-telegram: mark all external links 2025-04-24 23:24:53 +02:00
Christian Hesse
c69b13c879 doc/mod/notification-notify: mark all external links 2025-04-24 23:24:50 +02:00
Christian Hesse
183b16d83c doc/mod/notification-matrix: mark all external links 2025-04-24 23:24:47 +02:00
Christian Hesse
0eaefcdc72 doc/mod/notification-email: mark all external links 2025-04-24 23:24:43 +02:00
Christian Hesse
2fa044972c doc/log-forward: mark all external links 2025-04-24 23:24:39 +02:00
Christian Hesse
3788a3e286 doc/fw-addr-lists: mark all external links 2025-04-24 23:24:36 +02:00
Christian Hesse
34eac64f33 doc/check-routeros-update: mark all external links 2025-04-24 23:24:32 +02:00
Christian Hesse
4118f53aae doc/backup-partition: mark all external links 2025-04-24 23:24:28 +02:00
Christian Hesse
b12f8a3974 doc/backup-cloud: mark all external links 2025-04-24 23:24:25 +02:00
Christian Hesse
a1437a4c83 CONTRIBUTIONS: mark all external links 2025-04-24 23:24:25 +02:00
Christian Hesse
8328400e87 CERTIFICATES: mark all external links 2025-04-24 23:24:25 +02:00
Christian Hesse
158230070f BRANCHES: mark all external links 2025-04-24 23:24:25 +02:00
Christian Hesse
405c329f39 README: mark all external links 2025-04-24 23:24:25 +02:00
Christian Hesse
b78df91b23 README: and another hint on RouterOS version 2025-04-17 22:22:05 +02:00
Christian Hesse
29bcd191ee global-functions: $ScriptInstallUpdate: support downloading certificate...
... for individual scripts. Just add it in comment with
"certificate=...". This also works on installtion:

$ScriptInstallUpdate new-script "base-url=..., certificate=...";

Closes: https://github.com/eworm-de/routeros-scripts/pull/97
2025-04-17 10:48:45 +02:00
Christian Hesse
d80f43a1c8 INITIAL-COMMANDS: fix typos 2025-04-14 11:19:46 +02:00
Miquel Bonastre
390e3653d7 INITIAL-COMMANDS: add status output
Co-authored-by: Christian Hesse <mail@eworm.de>
2025-04-14 11:19:42 +02:00
Miquel Bonastre
75163f0d3c INITIAL-COMMANDS: support installation from custom server
Closes: https://github.com/eworm-de/routeros-scripts/pull/96

Co-authored-by: Christian Hesse <mail@eworm.de>
2025-04-14 11:19:24 +02:00
Christian Hesse
d4b5e1f5e7 global-functions: $CertificateNameByCN: warn with no match 2025-04-10 11:08:43 +02:00
Christian Hesse
c823ff87ed global-functions: $CertificateNameByCN: return false without match...
... and return true on success.
2025-04-08 16:09:53 +02:00
Christian Hesse
44fa91f5c4 global-functions: $CertificateNameByCN: pick the first match only 2025-04-08 16:09:53 +02:00
Christian Hesse
e36613608c global-functions: $CertificateNameByCN: support matching by fingerprint and name 2025-04-08 16:09:53 +02:00
Christian Hesse
019e10e190 global-functions: $CertificateDownload: no infinite loop
We can not call $CertificateAvailable here, as that will most likely
cause an infinite loop. After all that's the certificate mkcert.org is
using. And it *is* available in this repository.
2025-04-08 16:09:53 +02:00
Christian Hesse
314ba5796d global-functions: $ScriptLock: increase interval with wait time
Inspired by: https://github.com/eworm-de/routeros-scripts/issues/95#issuecomment-2773513467
2025-04-08 16:09:53 +02:00
Christian Hesse
67e7b11aa7 update list of contributors 2025-04-08 09:13:59 +02:00
Ilya Kulakov
27987a0d7c global-functions: $ScriptLock: fix second parameter
This broke with 1e8918fdaa5a30393e2004d1f5e4dff458936b67...

Fixes: https://github.com/eworm-de/routeros-scripts/issues/95
2025-04-08 09:11:45 +02:00
Christian Hesse
2cc47f56b9 README: give the script names 2025-04-02 11:32:24 +02:00
Christian Hesse
b560ea4b7d logo: strip some bytes...
... by just re-compressing/re-encoding.
2025-04-01 17:39:50 +02:00
Christian Hesse
cdfb086b49 mod/notification-telegram: fix override quirk
IDs for chat and thread can be overridden. Overriding the chat probably
makes the thread invalid - so ignore that then.
2025-04-01 17:39:50 +02:00
Christian Hesse
3c30276e23 check-routeros-update: split off check-perpetual-license...
... and also add documentation, screenshot, etc.
2025-04-01 17:39:50 +02:00
Christian Hesse
16c9ce437e check-routeros-update: send notification on renewed license...
... when a warning has been sent before.
2025-03-27 22:26:39 +01:00
Christian Hesse
6909514692 check-routeros-update: send certificate warning just once...
... and another one once expired.
2025-03-27 10:27:54 +01:00
Christian Hesse
f8c3659f6a support creating the checksums file 2025-03-27 10:27:54 +01:00
Christian Hesse
ce39b79f69 capsman-download-packages: fix parameter for $RmFile
The function can not handle ids, we have to pass a name instead.
2025-03-13 11:50:38 +01:00
Christian Hesse
20bf609c44 check-routeros-update: fix condition for license check
Turns out that `next-renewal-at` is moved forward when renewal failed,
so it never matches the criteria. Just start complaining three weeks
before deadline.
2025-03-13 10:51:39 +01:00
Christian Hesse
b63e0fcb2f netwatch-notify: check matching address type only 2025-03-12 11:26:22 +01:00
Christian Hesse
1555426687 netwatch-notify: increase the timeout even more
This interacts with the number of addresses in the address-list. Having
a lot of addresses there (for exemple from script 'fw-addr-lists' 😜)
makes the 'find' take longer. We have to make sure that 'find' succeeds
before the address times out.

As this does not hurt... Let's just bump to 10 seconds to be safe.
2025-03-12 11:18:18 +01:00
Christian Hesse
97b99316b2 netwatch-notify: increase timeout...
... as a timeout of one second expires immediately. 🤨
2025-03-12 10:31:11 +01:00
Christian Hesse
788400c458 fw-addr-lists: raw.githubusercontent.com requires 'USERTrust RSA Certification Authority' now 2025-03-11 15:51:25 +01:00
Christian Hesse
eb59dd21ca check-routeros-update: check perpetual license...
... as these have to be renewed and can expire.
2025-03-11 15:51:25 +01:00
Christian Hesse
79a4b369cb Merge branch 'fw-addr-lists' into next 2025-03-11 15:51:25 +01:00
Christian Hesse
f0e6cbcfe1 fw-addr-lists: get branch from calculated checksum
The addresses were spread very uneven before.

Let's calculate a checksum, and take the first two characters of that.
The addresses are now spread evenly on 256 branches (0x00 to 0xff).
2025-03-11 15:51:10 +01:00
Christian Hesse
d71ea804b0 fw-addr-lists: two characters for branch
Using one character for IPv4 is ok (1 to 9), but IPv6 global unicase
(2000::/3) results in just two different characters (2 and 3).

So let's use first two characters...
2025-03-11 14:20:50 +01:00
Christian Hesse
e148df9e57 fw-addr-lists: put addresses into "branches"...
... effectively adding another layer and some complexity, but:
The addresses are sorted inside the array, and sorting less addresses in
a branch saves a lot of processing power. So this is a lot faster now...
2025-03-11 14:20:44 +01:00
Christian Hesse
2f55bfaf00 fw-addr-lists: strip cidr for host addresses
This makes sure the addresses match later when we read them from
address-list for renew.
2025-03-11 14:19:10 +01:00
Christian Hesse
ea6de35699 fw-addr-lists: do not clean up
Cleanup is important on renew (so the script does not attempt to re-add),
but we do not care here.
2025-03-11 14:13:55 +01:00
Christian Hesse
fb343c99e3 fw-addr-lists: put timeout into variable 2025-03-06 22:59:31 +01:00
Christian Hesse
7be26a0712 DEBUG: add info on $LogPrintVerbose 2025-03-06 15:59:44 +01:00
Christian Hesse
6d718ec987 fw-addr-lists: use $LogPrintVerbose ...
... to reduce debug output and speed up execution.
2025-03-06 15:59:44 +01:00
Christian Hesse
e341e1c30c global-functions: introduce $LogPrintVerbose ...
... which is a declared function, but has no code, intentionally. It can be
called as a no-op by default.

If you want this output set the function to be the same as $LogPrint:

    :set LogPrintVerbose $LogPrint;
2025-03-06 15:59:11 +01:00
Christian Hesse
b43b1b3955 Merge branch 'checksums' into next 2025-03-06 10:43:15 +01:00
Christian Hesse
1b46a5fd9b global-functions: $ScriptInstallUpdate: checksum only for same source
So ignore if script is fetched from different base or with different
suffix.
2025-03-06 10:43:13 +01:00
Christian Hesse
b13360e4b8 global-functions: $ScriptInstallUpdate: simplify check
This one should suffice...
2025-03-06 10:42:52 +01:00
Christian Hesse
c9de6d8579 global-functions: $ScriptInstallUpdate: put checksum into variable 2025-03-06 10:42:27 +01:00
Christian Hesse
10374afc18 global-functions: $ScriptInstallUpdate: support checksums for CRLF scripts 2025-03-06 10:42:00 +01:00
Christian Hesse
0c1d96f89d global-functions: $ScriptInstallUpdate: get and compare checksums
The file 'checksums.json' is generated when deploying to my web
server... This should speed up the update a lot as it reduces downloads
to a minimum. 🎉😁
2025-03-06 10:41:28 +01:00
Christian Hesse
3ccaafd1b3 global-functions: $ScriptInstallUpdate: move code into block 2025-03-05 01:15:22 +01:00
Christian Hesse
469f783a92 ipv6-update: check for availability of both variables 2025-03-03 09:12:43 +01:00
Christian Hesse
33c02e0609 ipv6-update: ignore if prefix is no longer valid 2025-03-03 09:10:54 +01:00
Christian Hesse
6331505dbe Merge branch 'quote-file-name' into next
This is required with RouterOS 7.18 now...

Well, probably the change was introduced with one of the
beta versions...
2025-02-27 10:52:52 +01:00
Christian Hesse
0c4fb42616 mod/notification-telegram: $GetTelegramChatId: give thead id...
... if message was sent to group's topic.
2025-02-27 10:52:52 +01:00
Christian Hesse
f5189b8bd7 INITIAL-COMMANDS: quote the certificate file name 2025-02-27 10:52:52 +01:00
Christian Hesse
e2fe653035 mod/notification-telegram: $GetTelegramChatId: use last message 2025-02-27 10:52:52 +01:00
Christian Hesse
b11be59b08 README: quote the certificate file name 2025-02-27 10:52:52 +01:00
Christian Hesse
24de060904 Merge branch 'check-certificates' into next 2025-02-27 10:52:19 +01:00
Christian Hesse
14195c51ca check-certificates: try PKCS#12 before PEM...
... as that is more likely to have a private key.

Is that true? 🤨
2025-02-26 18:25:58 +01:00
Christian Hesse
e833dfcf25 check-certificates: simplify return from function...
... and also break earch on success.
2025-02-26 18:05:32 +01:00
Christian Hesse
512c54bd59 check-certificates: ... and even more 2025-02-26 18:05:32 +01:00
Christian Hesse
3d40b4419d check-certificates: add more debug output 2025-02-26 18:03:45 +01:00
Christian Hesse
a6d4e7e82c check-certificates: drop dot from type...
... and add it in file name.
2025-02-26 18:03:17 +01:00
Christian Hesse
f6c2225f68 check-certificates: catch and ignore import error
Hmm... 🤨 When was that runtime error introduced? I *think* it
worked before.
2025-02-26 13:57:51 +01:00
Christian Hesse
53b13b295a mod/notification-telegram: introduce $GetTelegramChatId 2025-02-25 22:37:30 +01:00
Christian Hesse
4eafcaa3ac telegram-chat: say hello when awaiting commands 2025-02-25 22:16:48 +01:00
Christian Hesse
c33eb41c9c global-functions: $DeviceInfo: add license level, re-order 2025-02-25 17:55:26 +01:00
Christian Hesse
78f9687558 Merge branch 'telegram-topics' into next 2025-02-25 17:55:26 +01:00
Christian Hesse
e5de9de391 notify on support for Telegram group topics 2025-02-25 17:55:26 +01:00
Christian Hesse
7928c5f054 telegram-chat: support reply in group's topic 2025-02-25 17:55:26 +01:00
Christian Hesse
757fa60e6f telegram-chat: make $IsReply a boolean...
... and check for correct data type.

We need this for a group with topic feature enabled, as that variable is
set there, but is is an array.
2025-02-25 17:55:26 +01:00
Christian Hesse
a22b62f588 mod/notification-telegram: support sending to group's topic...
... when a group has enabled the "Topics" feature.
2025-02-25 17:55:12 +01:00
Christian Hesse
cad104879c mod/notification-telegram: simplify the queue...
... and pass http-data as a complete sting.
2025-02-24 15:18:53 +01:00
Christian Hesse
58da92e36a global-functions: $WaitForFile: drop the warning on file handling breakage...
... but keep the workaround for now - just to be sure.
2025-02-19 22:21:03 +01:00
Christian Hesse
2c92c78b46 global-functions: $ScriptInstallUpdate: also show commit info 2025-02-17 13:55:44 +01:00
Christian Hesse
75633872aa global-functions: $DeviceInfo: also show commit info 2025-02-17 13:55:36 +01:00
Christian Hesse
dafcc1a0cb global-functions: $RmFile: fix type safeguard
Ups... 🫣
The type is not just literal 'file' - but what ever type the file is,
like 'backup', 'package', 'script', '.conf file', ...

So let's match those types we do *not* want to remove.

Fixes: https://github.com/eworm-de/routeros-scripts/issues/90
2025-02-13 17:58:48 +01:00
Christian Hesse
0199ea8884 global-functions: $ScriptInstallUpdate: show commit id (if available) 2025-02-13 09:50:22 +01:00
Christian Hesse
584e507fd1 global-functions: $DeviceInfo: show commit id (if available) 2025-02-13 09:03:05 +01:00
Christian Hesse
5715bc7b57 mod/scriptrunonce: always give proper return code 2025-02-12 17:40:27 +01:00
Christian Hesse
1c957dbc6d mod/scriptrunonce: resolve nested conditions 2025-02-12 17:40:27 +01:00
Christian Hesse
b7b3b43f3b mod/scriptrunonce: use $FetchHuge 2025-02-12 17:40:27 +01:00
Christian Hesse
df631b987d fw-addr-lists: add a collective list in default configuration 2025-02-12 17:40:27 +01:00
Christian Hesse
c8759381e9 global-functions: $WaitForFile: check that we can get properties
Looks like RouterOS 7.18beta2 brings more breakage. Having a file
available in listing is just the first step now. We also need to make
sure that the file properties are accessible... 🤪

I have seen this taking several tens of seconds at least... 🤪🤪 So
let's just try until we have properties available, or the file vanishes.

Reported as SUP-179200. 🤞
2025-02-12 10:49:38 +01:00
Christian Hesse
d41f758550 introduce DEBUG info 2025-02-12 10:49:34 +01:00
Christian Hesse
e1c561dd91 global-functions: $MkDir: add debug output 2025-02-11 14:56:43 +01:00
Christian Hesse
4d0b4a1ff4 fw-addr-lists: these lists are deprecated and discontinued
Any alternatives around?
2025-02-11 14:30:14 +01:00
Christian Hesse
8af67af462 doc/log-forward: mention ntfy 2025-02-10 15:31:20 +01:00
Christian Hesse
da280586b5 doc/log-forward: add a hint on defaults 2025-02-10 15:31:20 +01:00
Christian Hesse
2e42f7963c mod/notification-ntfy: use empty strings as default...
... which should be fine now that the credentials are not passed with
fetch's properties, but as properly formatted authentication header.
2025-02-10 15:23:50 +01:00
Christian Hesse
fc3beac83b log-forward: make empty string a special meaning 2025-02-10 15:23:50 +01:00
Christian Hesse
fefe11d1e8 Merge branch 'rmdir-rmfile' into next
RouterOS 7.18beta2 comes with some severe issues in file handling,
probably racy conditions. Let's move file (and directory) removal to
functions, so errors can be caught and ignored 🤪 from a central place.
2025-02-10 15:23:50 +01:00
Christian Hesse
b156fc43cf telegram-chat: use $RmDir 2025-02-10 15:23:50 +01:00
Christian Hesse
0fea300fea mod/ssh-keys-import: use $RmDir 2025-02-10 15:23:50 +01:00
Christian Hesse
6570a84904 check-certificates: use $RmFile 2025-02-10 15:23:50 +01:00
Christian Hesse
63db96bdcc capsman-download-packages: use $RmFile 2025-02-10 15:23:50 +01:00
Christian Hesse
88ff031368 backup-upload: use $RmFile 2025-02-10 15:23:50 +01:00
Christian Hesse
81ba47a07d backup-upload: use $RmDir 2025-02-10 15:23:50 +01:00
Christian Hesse
d748b69142 backup-cloud: use $RmDir 2025-02-10 15:23:50 +01:00
Christian Hesse
f5f00b70e3 global-functions: $MkDir: use $RmDir 2025-02-10 15:23:50 +01:00
Christian Hesse
4760515add global-functions: $FetchHuge: use $RmDir 2025-02-10 15:23:50 +01:00
Christian Hesse
d19b90df08 global-functions: $FetchHuge: use $RmFile 2025-02-10 15:23:50 +01:00
Christian Hesse
ea8ec6b580 global-functions: $DownloadPackage: use $RmFile 2025-02-10 15:23:50 +01:00
Christian Hesse
dbdf295244 global-functions: $CertificateDownload: use $RmFile 2025-02-10 15:23:50 +01:00
Christian Hesse
82020ddd73 global-functions: $RmDir: fail on wrong type 2025-02-10 15:23:50 +01:00
Christian Hesse
a8e5b5226b global-functions: $RmFile: fail on wrong type 2025-02-10 15:23:50 +01:00
Christian Hesse
4bfb591fa0 bump required RouterOS version for all scripts 2025-02-07 17:44:41 +01:00
Christian Hesse
49d9fb1ffd global-functions: $RmDir: add debug output 2025-02-07 17:44:41 +01:00
Christian Hesse
7233dea5bb global-functions: $RmFile: add debug output 2025-02-07 17:44:41 +01:00
Christian Hesse
727495d9c4 global-functions: introduce $RmDir 2025-02-07 17:44:41 +01:00
Christian Hesse
4542c2b19e global-functions: introduce $RmFile 2025-02-07 17:44:41 +01:00
Christian Hesse
0fb5fd0323 global-functions: $MkDir: create directory directly...
... instead of file inside directory. This requires RouterOS 7.15, so
bumping requirement.
2025-02-07 17:44:32 +01:00
Christian Hesse
dbdc3e4718 packages-update: ignore available packages
This was introduced with RouterOS 7.18beta2 to list and install available
packages. We do not want to install all of them. 😝
2025-02-07 17:16:37 +01:00
Christian Hesse
dafd95d44a packages-update: disable random delay for backup 2025-02-06 21:26:39 +01:00
Christian Hesse
7b660d0952 packages-update: move configuration variables up 2025-02-06 21:24:20 +01:00
229 changed files with 3017 additions and 1377 deletions

3
.gitignore vendored
View file

@ -9,5 +9,8 @@
# html files (as generated from markdown) # html files (as generated from markdown)
*.html *.html
# checksums file as used by $ScriptInstallUpdate
checksums.json
# Mac OS X folder settings file # Mac OS X folder settings file
.DS_Store .DS_Store

View file

@ -4,7 +4,7 @@ Installing from branches
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.17-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
@ -13,7 +13,7 @@ Installing from branches
> ⚠️ **Warning**: Living on the edge? Great, read on! > ⚠️ **Warning**: Living on the edge? Great, read on!
> If not: Please use the `main` branch and leave this page! > If not: Please use the `main` branch and leave this page!
These scripts are developed in a [git](https://git-scm.com/) repository. These scripts are developed in a [git ↗️](https://git-scm.com/) repository.
Development and experimental branches are used to provide early access Development and experimental branches are used to provide early access
for specific changes. You can install scripts from these branches for specific changes. You can install scripts from these branches
for testing. for testing.

View file

@ -4,7 +4,7 @@ Certificate name from browser
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.17-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
@ -21,7 +21,7 @@ first step of [installation](README.md#the-long-way-in-detail) is importing
the certificate. the certificate.
The scripts can install additional certificates when required. This happens The scripts can install additional certificates when required. This happens
from this repository if available, or from [mkcert.org](https://mkcert.org) from this repository if available, or from [mkcert.org ↗️](https://mkcert.org)
as a fallback. as a fallback.
Get the certificate's CommonName Get the certificate's CommonName
@ -29,7 +29,7 @@ Get the certificate's CommonName
But how to determine what certificate may be required? Often easiest way But how to determine what certificate may be required? Often easiest way
is to use a desktop browser to get that information. This demonstration uses is to use a desktop browser to get that information. This demonstration uses
[Mozilla Firefox](https://www.mozilla.org/firefox/). [Mozilla Firefox ↗️](https://www.mozilla.org/firefox/).
Let's assume we want to make sure the certificate for Let's assume we want to make sure the certificate for
[git.eworm.de](https://git.eworm.de/) is available. Open that page in the [git.eworm.de](https://git.eworm.de/) is available. Open that page in the
@ -61,7 +61,7 @@ Import a certificate by CommonName
Running the function `$CertificateAvailable` with that name as parameter Running the function `$CertificateAvailable` with that name as parameter
makes sure the certificate is available in the device's store: makes sure the certificate is available in the device's store:
$CertificateAvailable "ISRG Root X2"; $CertificateAvailable "ISRG Root X2" "fetch";
If the certificate is actually available already nothing happens, and there If the certificate is actually available already nothing happens, and there
is no output. Otherwise the certificate is downloaded and imported. is no output. Otherwise the certificate is downloaded and imported.
@ -74,6 +74,7 @@ See also
* [Download, import and update firewall address-lists](doc/fw-addr-lists.md) * [Download, import and update firewall address-lists](doc/fw-addr-lists.md)
* [Manage DNS and DoH servers from netwatch](doc/netwatch-dns.md) * [Manage DNS and DoH servers from netwatch](doc/netwatch-dns.md)
* [Send notifications via Gotify](doc/mod/notification-gotify.md)
* [Send notifications via Matrix](doc/mod/notification-matrix.md) * [Send notifications via Matrix](doc/mod/notification-matrix.md)
* [Send notifications via Ntfy](doc/mod/notification-ntfy.md) * [Send notifications via Ntfy](doc/mod/notification-ntfy.md)

View file

@ -4,7 +4,7 @@ Past Contributions
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.17-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
@ -21,6 +21,8 @@ for details!
* [Ben Harris](mailto:mail@bharr.is) (@bharrisau) * [Ben Harris](mailto:mail@bharr.is) (@bharrisau)
* [Daniel Ziegenberg](mailto:daniel@ziegenberg.at) (@ziegenberg) * [Daniel Ziegenberg](mailto:daniel@ziegenberg.at) (@ziegenberg)
* [Ignacio Serrano](mailto:ignic@ignic.com) (@ignic) * [Ignacio Serrano](mailto:ignic@ignic.com) (@ignic)
* [Ilya Kulakov](mailto:kulakov.ilya@gmail.com) (@Kentzo)
* [Leonardo David Monteiro](mailto:leo@cub3.xyz) (@leosfsm)
* [Michael Gisbers](mailto:michael@gisbers.de) (@mgisbers) * [Michael Gisbers](mailto:michael@gisbers.de) (@mgisbers)
* [Miquel Bonastre](mailto:mbonastre@yahoo.com) (@mbonastre) * [Miquel Bonastre](mailto:mbonastre@yahoo.com) (@mbonastre)
* @netravnen * @netravnen
@ -30,9 +32,10 @@ for details!
## Donations ## Donations
Add yourself to the list, Add yourself to the list,
[donate with PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)! [donate with PayPal ↗️](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)!
* Abdul Mannan Abbasi * Abdul Mannan Abbasi
* Alex Maier
* Andrea Ruffini Perico * Andrea Ruffini Perico
* Andrew Cox * Andrew Cox
* Christoph Boss (@Kampfwurst) * Christoph Boss (@Kampfwurst)

63
DEBUG.md Normal file
View file

@ -0,0 +1,63 @@
Debug output and logs
=====================
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.17-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
[⬅️ Go back to main README](README.md)
Sometimes scripts do not behave as expected. In these cases debug output
or logs can help.
## Debug output
Run this command in a terminal:
:set PrintDebug true;
You will then see debug output when running the script from terminal.
To revert to default output run:
:set PrintDebug false;
### Debug output for specific script
Even having debug output for a specific script or function only (or a
set of) is possible. To enable debug output for `telegram-chat` run:
:set ($PrintDebugOverride->"telegram-chat") true;
## Debug logs
The debug info can go to system log. To make it show up in `memory` run:
/system/logging/add topics=script,debug action=memory;
Other actions (`disk`, `email`, `remote` or `support`) can be used as
well. I do not recommend using `echo` - use [debug output](#debug-output)
instead.
Disable or remove that setting to restore regular logging.
## Verbose output
Specific scripts can generate huge amount of output. These do use a function
`$LogPrintVerbose`, which is declared, but has no code, intentionally.
If you *really* want that output set the function to be the same as
`$LogPrint`:
:set LogPrintVerbose $LogPrint;
To revert that change just run:
:set LogPrintVerbose;
---
[⬅️ Go back to main README](README.md)
[⬆️ Go back to top](#top)

View file

@ -4,36 +4,52 @@ Initial commands
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.17-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
[⬅️ Go back to main README](README.md) [⬅️ Go back to main README](README.md)
> ⚠️ **Warning**: These command are inteneded for initial setup. If you are > ⚠️ **Warning**: These commands are intended for initial setup. If you are
> not aware of the procedure please follow > not aware of the procedure please follow
> [the long way in detail](README.md#the-long-way-in-detail). > [the long way in detail](README.md#the-long-way-in-detail).
Run the complete base installation: Run the complete base installation:
{ {
/tool/fetch "https://git.eworm.de/cgit/routeros-scripts/plain/certs/ISRG-Root-X2.pem" dst-path="isrg-root-x2.pem" as-value; :local BaseUrl "https://rsc.eworm.de/main/";
:delay 1s; :local CertCommonName "ISRG Root X2";
/certificate/import file-name=isrg-root-x2.pem passphrase=""; :local CertFileName "ISRG-Root-X2.pem";
:if ([ :len [ /certificate/find where fingerprint="69729b8e15a86efc177a57afb7171dfc64add28c2fca8cf1507e34453ccb1470" ] ] != 1) do={ :local CertFingerprint "69729b8e15a86efc177a57afb7171dfc64add28c2fca8cf1507e34453ccb1470";
:error "Something is wrong with your certificates!";
:local CertSettings [ /certificate/settings/get ];
:if (!((($CertSettings->"builtin-trust-anchors") = "trusted" || \
($CertSettings->"builtin-trust-store") ~ "fetch" || \
($CertSettings->"builtin-trust-store") = "all") && \
[[ :parse (":return [ :len [ /certificate/builtin/find where common-name=\"" . $CertCommonName . "\" ] ]") ]] > 0)) do={
:put "Importing certificate...";
/tool/fetch ($BaseUrl . "certs/" . $CertFileName) dst-path=$CertFileName as-value;
:delay 1s;
/certificate/import file-name=$CertFileName passphrase="";
:if ([ :len [ /certificate/find where fingerprint=$CertFingerprint ] ] != 1) do={
:error "Something is wrong with your certificates!";
};
:delay 1s;
}; };
:delay 1s; :put "Renaming global-config-overlay, if exists...";
/system/script/set name=("global-config-overlay-" . [ /system/clock/get date ] . "-" . [ /system/clock/get time ]) [ find where name="global-config-overlay" ]; /system/script/set name=("global-config-overlay-" . [ /system/clock/get date ] . "-" . [ /system/clock/get time ]) [ find where name="global-config-overlay" ];
:foreach Script in={ "global-config"; "global-config-overlay"; "global-functions" } do={ :foreach Script in={ "global-config"; "global-config-overlay"; "global-functions" } do={
:put "Installing $Script...";
/system/script/remove [ find where name=$Script ]; /system/script/remove [ find where name=$Script ];
/system/script/add name=$Script owner=$Script source=([ /tool/fetch check-certificate=yes-without-crl ("https://git.eworm.de/cgit/routeros-scripts/plain/" . $Script . ".rsc") output=user as-value]->"data"); /system/script/add name=$Script owner=$Script source=([ /tool/fetch check-certificate=yes-without-crl ($BaseUrl . $Script . ".rsc") output=user as-value ]->"data");
}; };
:put "Loading configuration and functions...";
/system/script { run global-config; run global-functions; }; /system/script { run global-config; run global-functions; };
/system/scheduler/remove [ find where name="global-scripts" ]; :if ([ :len [ /certificate/find where fingerprint=$CertFingerprint ] ] > 0) do={
/system/scheduler/add name="global-scripts" start-time=startup on-event="/system/script { run global-config; run global-functions; }"; :put "Renaming certificate by its common-name...";
:global CertificateNameByCN; :global CertificateNameByCN;
$CertificateNameByCN "ISRG Root X2"; $CertificateNameByCN $CertFingerprint;
};
}; };
Then continue setup with Then continue setup with

View file

@ -2,35 +2,45 @@
# template scripts -> final scripts # template scripts -> final scripts
# markdown files -> html files # markdown files -> html files
CAPSMAN = $(wildcard *.capsman.rsc) ALL_RSC := $(wildcard *.rsc */*.rsc)
LOCAL = $(wildcard *.local.rsc) GEN_RSC := $(wildcard *.capsman.rsc *.local.rsc *.wifi.rsc)
WIFI = $(wildcard *.wifi.rsc)
MARKDOWN = $(wildcard *.md doc/*.md doc/mod/*.md) MARKDOWN := $(wildcard *.md doc/*.md doc/mod/*.md)
HTML = $(MARKDOWN:.md=.html) HTML := $(MARKDOWN:.md=.html)
all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML) DATE ?= $(shell date --rfc-email)
VERSION ?= $(shell git symbolic-ref --short HEAD 2>/dev/null)/$(shell git rev-list --count HEAD 2>/dev/null)/$(shell git rev-parse --short=8 HEAD 2>/dev/null)
export DATE VERSION
%.html: %.md Makefile .PHONY: all checksums commitinfo docs rsc clean
markdown $< | sed 's/href="\([-_\./[:alnum:]]*\)\.md"/href="\1.html"/g' > $@
%.capsman.rsc: %.template.rsc Makefile all: checksums docs rsc
sed -e '/\/interface\/wifi\//d' -e '/\/interface\/wireless\//d' -e 's|%TEMPL%|.capsman|' \
-e '/^# NOT \/caps-man\/ #$$/,/^# NOT \/caps-man\/ #$$/d' \
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
< $< > $@
%.local.rsc: %.template.rsc Makefile checksums: checksums.json
sed -e '/\/caps-man\//d' -e '/\/interface\/wifi\//d' -e 's|%TEMPL%|.local|' \
-e '/^# NOT \/interface\/wireless\/ #$$/,/^# NOT \/interface\/wireless\/ #$$/d' \
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
< $< > $@
%.wifi.rsc: %.template.rsc Makefile checksums.json: contrib/checksums.sh $(ALL_RSC)
sed -e '/\/caps-man\//d' -e '/\/interface\/wireless\//d' -e 's|%TEMPL%|.wifi|' \ contrib/checksums.sh > $@
-e '/^# NOT \/interface\/wifi\/ #$$/,/^# NOT \/interface\/wifi\/ #$$/d' \
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \ commitinfo: global-functions.rsc
< $< > $@ contrib/commitinfo.sh $< > $<~
mv $<~ $<
docs: $(HTML)
%.html: %.md general/style.css contrib/html.sh contrib/html.sh.d/head.html contrib/html.sh.d/foot.html
contrib/html.sh $< > $@
rsc: $(GEN_RSC)
%.capsman.rsc: %.template.rsc contrib/template-capsman.sh
contrib/template-capsman.sh $< > $@
%.local.rsc: %.template.rsc contrib/template-local.sh
contrib/template-local.sh $< > $@
%.wifi.rsc: %.template.rsc contrib/template-wifi.sh
contrib/template-wifi.sh $< > $@
clean: clean:
rm -f $(HTML) rm -f $(HTML) checksums.json
make -C contrib/ clean

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Before After
Before After

230
README.md
View file

@ -4,19 +4,22 @@ RouterOS Scripts
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.17-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
**a collection of scripts for MikroTik RouterOS**
![RouterOS Scripts Logo](logo.svg) ![RouterOS Scripts Logo](logo.svg)
[RouterOS](https://mikrotik.com/software) is the operating system developed [RouterOS ↗️](https://mikrotik.com/software) is the operating system developed
by [MikroTik](https://mikrotik.com/aboutus) for networking tasks. This by [MikroTik ↗️](https://mikrotik.com/aboutus) for networking tasks. This
repository holds a number of [scripts](https://wiki.mikrotik.com/wiki/Manual:Scripting) repository holds a number of [scripts ↗️](https://wiki.mikrotik.com/wiki/Manual:Scripting)
to manage RouterOS devices or extend their functionality. to manage RouterOS devices or extend their functionality.
*Use at your own risk*, pay attention to *Use at your own risk*, pay attention to
[license and warranty](#license-and-warranty)! [license and warranty](#license-and-warranty), and
[disclaimer on external links](#disclaimer-on-external-links)!
Requirements Requirements
------------ ------------
@ -24,18 +27,38 @@ Requirements
### Software (RouterOS) ### Software (RouterOS)
Latest version of the scripts require recent RouterOS to function properly. Latest version of the scripts require recent RouterOS to function properly.
Make sure to install latest updates before you begin. If new functionality Make sure to install latest updates before you begin. This is supposed to
or a breaking change in RouterOS `7.n` is used in my scripts I push my work flawlessly with these channels:
change some time after `7.(n+1)` was released. At any time you should have
at least two minor and their bugfix releases to choose from.
Specific scripts may require even newer RouterOS version. * `stable` - the latest version considered stable for daily use, including
new features
* `long-term` - a version considered rock-solid, usually one minor version
behind `stable` (`7.(n-1)`)
New functionality or breaking changes in RouterOS are adopted fairly quick.
These changes are pushed for general availability once a version of
RouterOS supporting this had been released to the `long-term` channel a
reasonable time ago.
At any time you should have at least two minor versions and their bugfix
releases to choose from. Often way older versions of RouterOS work just
fine.
On the other hand in seldom cases and for good reasons *specific* scripts
may require an even newer RouterOS version, so only `stable` is supported
temporarily.
> 💡️ **Hint**: If in doubt have a look at the badge at the top of each
> page showing the minimum version required:
> ![required RouterOS version](https://img.shields.io/badge/RouterOS-7.17-yellow?style=flat)
> **Info**: The `main` branch is now RouterOS v7 only. If you are still > **Info**: The `main` branch is now RouterOS v7 only. If you are still
> running RouterOS v6 switch to `routeros-v6` branch! > running RouterOS v6 switch to `routeros-v6` branch!
#### Prerequisite configuration
Starting with RouterOS 7.17 the Starting with RouterOS 7.17 the
[device-mode](https://help.mikrotik.com/docs/spaces/ROS/pages/93749258/Device-mode) [device-mode ↗️](https://help.mikrotik.com/docs/spaces/ROS/pages/93749258/Device-mode)
has been extended to give more fine-grained control over what features are has been extended to give more fine-grained control over what features are
available. You need to enable `scheduler` and `fetch` at least, specific available. You need to enable `scheduler` and `fetch` at least, specific
scripts may require additional features. scripts may require additional features.
@ -54,16 +77,19 @@ Initial setup
### Get me ready! ### Get me ready!
If you know how things work just copy and paste the If you know how things work just copy and paste the
[initial commands](INITIAL-COMMANDS.md). Remember to edit and rerun [initial commands](INITIAL-COMMANDS.md). These also support fixing an
existing but broken installation. Remember to edit and rerun
`global-config-overlay`! `global-config-overlay`!
First time users should take the long way below.
> 💡️ **Hint**: First time users should take
> [the long way in detail](#the-long-way-in-detail) below.
### Live presentation ### Live presentation
Want to see it in action? I've had a presentation [Repository based Want to see it in action? I've had a presentation [Repository based
RouterOS script distribution](https://www.youtube.com/watch?v=B9neG3oAhcY) RouterOS script distribution ↗️](https://www.youtube.com/watch?v=B9neG3oAhcY)
including demonstation recorded live at [MUM Europe including demonstration recorded live at [MUM Europe
2019](https://mum.mikrotik.com/2019/EU/) in Vienna. 2019 ↗️](https://mum.mikrotik.com/2019/EU/) in Vienna.
> ⚠️ **Warning**: Some details changed. So see the presentation, then follow > ⚠️ **Warning**: Some details changed. So see the presentation, then follow
> the steps below for up-to-date commands. > the steps below for up-to-date commands.
@ -71,11 +97,22 @@ including demonstation recorded live at [MUM Europe
### The long way in detail ### The long way in detail
The update script does server certificate verification, so first step is to The update script does server certificate verification, so first step is to
download the certificates. If you intend to download the scripts from a download the certificates.
> 💡️ **Hint**: RouterOS 7.19 comes with a builtin certificate store. You
> can skip the steps regarding certificate download and import and jump
> to [installation of scripts](#installation-of-scripts) if you set the
> trust for these builtin trust anchors:
> `/certificate/settings/set builtin-trust-anchors=trusted;`
> With RouterOS 7.21 the functionality was changed. Set this at minimum,
> but make sure not to drop other targets:
> `/certificate/settings/set builtin-trust-store=fetch;`
If you intend to download the scripts from a
different location (for example from github.com) install the corresponding different location (for example from github.com) install the corresponding
certificate chain. certificate chain.
/tool/fetch "https://git.eworm.de/cgit/routeros-scripts/plain/certs/ISRG-Root-X2.pem" dst-path="isrg-root-x2.pem"; /tool/fetch "https://rsc.eworm.de/main/certs/ISRG-Root-X2.pem" dst-path="isrg-root-x2.pem";
![screenshot: download certs](README.d/01-download-certs.avif) ![screenshot: download certs](README.d/01-download-certs.avif)
@ -83,11 +120,11 @@ Note that the commands above do *not* verify server certificate, so if you
want to be safe download with your workstations's browser and transfer the want to be safe download with your workstations's browser and transfer the
file to your MikroTik device. file to your MikroTik device.
* [ISRG Root X2](https://letsencrypt.org/certs/isrg-root-x2.pem) * [ISRG Root X2 ↗️](https://letsencrypt.org/certs/isrg-root-x2.pem)
Then we import the certificate. Then we import the certificate.
/certificate/import file-name=isrg-root-x2.pem passphrase=""; /certificate/import file-name="isrg-root-x2.pem" passphrase="";
Do not worry that the command is not shown - that happens because it contains Do not worry that the command is not shown - that happens because it contains
a sensitive property, the passphrase. a sensitive property, the passphrase.
@ -105,22 +142,27 @@ is shown.
Always make sure there are no certificates installed you do not know or want! Always make sure there are no certificates installed you do not know or want!
#### Installation of scripts
All following commands will verify the server certificate. For validity the All following commands will verify the server certificate. For validity the
certificate's lifetime is checked with local time, so make sure the device's certificate's lifetime is checked with local time, so make sure the device's
date and time is set correctly! date and time is set correctly!
Now let's download the main scripts and add them in configuration on the fly. Now let's download the main scripts and add them in configuration on the fly.
:foreach Script in={ "global-config"; "global-config-overlay"; "global-functions" } do={ /system/script/add name=$Script owner=$Script source=([ /tool/fetch check-certificate=yes-without-crl ("https://git.eworm.de/cgit/routeros-scripts/plain/" . $Script . ".rsc") output=user as-value]->"data"); }; :foreach Script in={ "global-config"; "global-config-overlay"; "global-functions" } do={ /system/script/add name=$Script owner=$Script source=([ /tool/fetch check-certificate=yes-without-crl ("https://rsc.eworm.de/main/" . $Script . ".rsc") output=user as-value ]->"data"); };
![screenshot: import scripts](README.d/04-import-scripts.avif) ![screenshot: import scripts](README.d/04-import-scripts.avif)
And finally load configuration and functions and add the scheduler. And finally run configuration and functions. This will also add the
scheduler for loading at system startup automatically.
/system/script { run global-config; run global-functions; }; /system/script { run global-config; run global-functions; };
/system/scheduler/add name="global-scripts" start-time=startup on-event="/system/script { run global-config; run global-functions; }";
![screenshot: run and schedule scripts](README.d/05-run-and-schedule-scripts.avif) ![screenshot: run scripts](README.d/05-run-scripts.avif)
> 💡️ **Hint**: You see complaints regarding syntax errors? Most likely the
> RouterOS on your device is too old. Check for updates!
### Scheduled automatic updates ### Scheduled automatic updates
@ -159,7 +201,7 @@ This last step is required when ever you make changes to your configuration.
> **Info**: It is recommended to edit the configuration using the command > **Info**: It is recommended to edit the configuration using the command
> line interface. If using Winbox on Windows OS, the line endings may be > line interface. If using Winbox on Windows OS, the line endings may be
> missing. To fix this run: > missing. To fix this run:
> `/system/script/set source=[ :tocrlf [ get global-config-overlay source ] ] global-config-overlay;` > `/system/script/set source=[ :tocrlf [ get global-config-overlay source ] ] global-config-overlay;`
Updating scripts Updating scripts
@ -191,7 +233,7 @@ Scheduler and events
-------------------- --------------------
Most scripts are designed to run regularly from Most scripts are designed to run regularly from
[scheduler](https://wiki.mikrotik.com/wiki/Manual:System/Scheduler). We just [scheduler ↗️](https://wiki.mikrotik.com/wiki/Manual:System/Scheduler). We just
added `check-routeros-update`, so let's run it daily to make sure not to added `check-routeros-update`, so let's run it daily to make sure not to
miss an update. miss an update.
@ -205,7 +247,7 @@ cleanup add a scheduler entry.
$ScriptInstallUpdate dhcp-to-dns,lease-script; $ScriptInstallUpdate dhcp-to-dns,lease-script;
/ip/dhcp-server/set lease-script=lease-script [ find ]; /ip/dhcp-server/set lease-script=lease-script [ find ];
/system/scheduler/add name="dhcp-to-dns" interval=5m on-event="/system/script/run dhcp-to-dns;"; /system/scheduler/add name="dhcp-to-dns" interval=5m start-time=startup on-event="/system/script/run dhcp-to-dns;";
![screenshot: setup lease script](README.d/12-setup-lease-script.avif) ![screenshot: setup lease script](README.d/12-setup-lease-script.avif)
@ -214,60 +256,62 @@ There's much more to explore... Have fun!
Available scripts Available scripts
----------------- -----------------
* [Find and remove access list duplicates](doc/accesslist-duplicates.md) * [Find and remove access list duplicates](doc/accesslist-duplicates.md) (`accesslist-duplicates`)
* [Upload backup to Mikrotik cloud](doc/backup-cloud.md) * [Upload backup to Mikrotik cloud](doc/backup-cloud.md) (`backup-cloud`)
* [Send backup via e-mail](doc/backup-email.md) * [Send backup via e-mail](doc/backup-email.md) (`backup-email`)
* [Save configuration to fallback partition](doc/backup-partition.md) * [Save configuration to fallback partition](doc/backup-partition.md) (`backup-partition`)
* [Upload backup to server](doc/backup-upload.md) * [Upload backup to server](doc/backup-upload.md) (`backup-upload`)
* [Download packages for CAP upgrade from CAPsMAN](doc/capsman-download-packages.md) * [Download packages for CAP upgrade from CAPsMAN](doc/capsman-download-packages.md) (`capsman-download-packages`)
* [Run rolling CAP upgrades from CAPsMAN](doc/capsman-rolling-upgrade.md) * [Run rolling CAP upgrades from CAPsMAN](doc/capsman-rolling-upgrade.md) (`capsman-rolling-upgrade`)
* [Renew locally issued certificates](doc/certificate-renew-issued.md) * [Renew locally issued certificates](doc/certificate-renew-issued.md) (`certificate-renew-issued`)
* [Renew certificates and notify on expiration](doc/check-certificates.md) * [Renew certificates and notify on expiration](doc/check-certificates.md) (`check-certificates`)
* [Notify about health state](doc/check-health.md) * [Notify about health state](doc/check-health.md) (`check-health`)
* [Notify on LTE firmware upgrade](doc/check-lte-firmware-upgrade.md) * [Notify on LTE firmware upgrade](doc/check-lte-firmware-upgrade.md) (`check-lte-firmware-upgrade`)
* [Notify on RouterOS update](doc/check-routeros-update.md) * [Check perpetual license on CHR](doc/check-perpetual-license.md) (`check-perpetual-license`)
* [Collect MAC addresses in wireless access list](doc/collect-wireless-mac.md) * [Notify on RouterOS update](doc/check-routeros-update.md) (`check-routeros-update`)
* [Use wireless network with daily psk](doc/daily-psk.md) * [Collect MAC addresses in wireless access list](doc/collect-wireless-mac.md) (`collect-wireless-mac`)
* [Comment DHCP leases with info from access list](doc/dhcp-lease-comment.md) * [Use wireless network with daily psk](doc/daily-psk.md) (`daily-psk`)
* [Create DNS records for DHCP leases](doc/dhcp-to-dns.md) * [Comment DHCP leases with info from access list](doc/dhcp-lease-comment.md) (`dhcp-lease-comment`)
* [Automatically upgrade firmware and reboot](doc/firmware-upgrade-reboot.md) * [Create DNS records for DHCP leases](doc/dhcp-to-dns.md) (`dhcp-to-dns`)
* [Download, import and update firewall address-lists](doc/fw-addr-lists.md) * [Automatically upgrade firmware and reboot](doc/firmware-upgrade-reboot.md) (`firmware-upgrade-reboot`)
* [Wait for global functions und modules](doc/global-wait.md) * [Download, import and update firewall address-lists](doc/fw-addr-lists.md) (`fw-addr-lists`)
* [Send GPS position to server](doc/gps-track.md) * [Wait for global functions und modules](doc/global-wait.md) (`global-wait`)
* [Use WPA network with hotspot credentials](doc/hotspot-to-wpa.md) * [Send GPS position to server](doc/gps-track.md) (`gps-track`)
* [Create DNS records for IPSec peers](doc/ipsec-to-dns.md) * [Use WPA network with hotspot credentials](doc/hotspot-to-wpa.md) (`hotspot-to-wpa` & `hotspot-to-wpa-cleanup`)
* [Update configuration on IPv6 prefix change](doc/ipv6-update.md) * [Create DNS records for IPSec peers](doc/ipsec-to-dns.md) (`ipsec-to-dns`)
* [Manage IP addresses with bridge status](doc/ip-addr-bridge.md) * [Update configuration on IPv6 prefix change](doc/ipv6-update.md) (`ipv6-update`)
* [Run other scripts on DHCP lease](doc/lease-script.md) * [Manage IP addresses with bridge status](doc/ip-addr-bridge.md) (`ip-addr-bridge`)
* [Manage LEDs dark mode](doc/leds-mode.md) * [Run other scripts on DHCP lease](doc/lease-script.md) (`lease-script`)
* [Forward log messages via notification](doc/log-forward.md) * [Manage LEDs dark mode](doc/leds-mode.md) (`leds-day-mode`, `leds-night-mode` & `leds-toggle-mode`)
* [Mode button with multiple presses](doc/mode-button.md) * [Forward log messages via notification](doc/log-forward.md) (`log-forward`)
* [Manage DNS and DoH servers from netwatch](doc/netwatch-dns.md) * [Mode button with multiple presses](doc/mode-button.md) (`mode-button`)
* [Notify on host up and down](doc/netwatch-notify.md) * [Manage DNS and DoH servers from netwatch](doc/netwatch-dns.md) (`netwatch-dns`)
* [Visualize OSPF state via LEDs](doc/ospf-to-leds.md) * [Notify on host up and down](doc/netwatch-notify.md) (`netwatch-notify`)
* [Manage system update](doc/packages-update.md) * [Visualize OSPF state via LEDs](doc/ospf-to-leds.md) (`ospf-to-leds`)
* [Run scripts on ppp connection](doc/ppp-on-up.md) * [Manage system update](doc/packages-update.md) (`packages-update`)
* [Act on received SMS](doc/sms-action.md) * [Run scripts on ppp connection](doc/ppp-on-up.md) (`ppp-on-up`)
* [Forward received SMS](doc/sms-forward.md) * [Act on received SMS](doc/sms-action.md) (`sms-action`)
* [Play Super Mario theme](doc/super-mario-theme.md) * [Forward received SMS](doc/sms-forward.md) (`sms-forward`)
* [Chat with your router and send commands via Telegram bot](doc/telegram-chat.md) * [Play Super Mario theme](doc/super-mario-theme.md) (`super-mario-theme`)
* [Install LTE firmware upgrade](doc/unattended-lte-firmware-upgrade.md) * [Chat with your router and send commands via Telegram bot](doc/telegram-chat.md) (`telegram-chat`)
* [Update GRE configuration with dynamic addresses](doc/update-gre-address.md) * [Install LTE firmware upgrade](doc/unattended-lte-firmware-upgrade.md) (`unattended-lte-firmware-upgrade`)
* [Update tunnelbroker configuration](doc/update-tunnelbroker.md) * [Update GRE configuration with dynamic addresses](doc/update-gre-address.md) (`update-gre-address`)
* [Update tunnelbroker configuration](doc/update-tunnelbroker.md) (`update-tunnelbroker`)
Available modules Available modules
----------------- -----------------
* [Manage ports in bridge](doc/mod/bridge-port-to.md) * [Manage ports in bridge](doc/mod/bridge-port-to.md) (`mod/bridge-port-to`)
* [Manage VLANs on bridge ports](doc/mod/bridge-port-vlan.md) * [Manage VLANs on bridge ports](doc/mod/bridge-port-vlan.md) (`mod/bridge-port-vlan`)
* [Inspect variables](doc/mod/inspectvar.md) * [Inspect variables](doc/mod/inspectvar.md) (`mod/inspectvar`)
* [IP address calculation](doc/mod/ipcalc.md) * [IP address calculation](doc/mod/ipcalc.md) (`mod/ipcalc`)
* [Send notifications via e-mail](doc/mod/notification-email.md) * [Send notifications via e-mail](doc/mod/notification-email.md) (`mod/notification-email`)
* [Send notifications via Matrix](doc/mod/notification-matrix.md) * [Send notifications via Gotify](doc/mod/notification-gotify.md) (`mod/notification-gotify`)
* [Send notifications via Ntfy](doc/mod/notification-ntfy.md) * [Send notifications via Matrix](doc/mod/notification-matrix.md) (`mod/notification-matrix`)
* [Send notifications via Telegram](doc/mod/notification-telegram.md) * [Send notifications via Ntfy](doc/mod/notification-ntfy.md) (`mod/notification-ntfy`)
* [Download script and run it once](doc/mod/scriptrunonce.md) * [Send notifications via Telegram](doc/mod/notification-telegram.md) (`mod/notification-telegram`)
* [Import ssh keys for public key authentication](doc/mod/ssh-keys-import.md) * [Download script and run it once](doc/mod/scriptrunonce.md) (`mod/scriptrunonce`)
* [Import ssh keys for public key authentication](doc/mod/ssh-keys-import.md) (`mod/ssh-keys-import`)
Installing custom scripts & modules Installing custom scripts & modules
----------------------------------- -----------------------------------
@ -324,7 +368,7 @@ Possibly a scheduler and other configuration has to be removed as well.
Contact Contact
------- -------
We have a Telegram Group [RouterOS-Scripts](https://t.me/routeros_scripts)! We have a Telegram Group [RouterOS-Scripts ↗️](https://t.me/routeros_scripts)!
[![RouterOS Scripts Telegram Group](README.d/telegram-group.avif)](https://t.me/routeros_scripts) [![RouterOS Scripts Telegram Group](README.d/telegram-group.avif)](https://t.me/routeros_scripts)
@ -348,7 +392,7 @@ at github.
This project is developed in private spare time and usage is free of charge This project is developed in private spare time and usage is free of charge
for you. If you like the scripts and think this is of value for you or your for you. If you like the scripts and think this is of value for you or your
business please consider to business please consider to
[donate with PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J). [donate with PayPal ↗️](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J).
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=for-the-badge)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=for-the-badge)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
@ -367,17 +411,33 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
[GNU General Public License](COPYING.md) for more details. [GNU General Public License](COPYING.md) for more details.
Disclaimer on external links
----------------------------
Our website contains links to the websites of third parties ("external
links"). As the content of these websites is not under our control, we
cannot assume any liability for such external content. In all cases, the
provider of information of the linked websites is liable for the content
and accuracy of the information provided. At the point in time when the
links were placed, no infringements of the law were recognisable to us.
As soon as an infringement of the law becomes known to us, we will
immediately remove the link in question.
> 💡️ **Hint**: All external links are marked with an arrow pointing
> diagonally in an up-right (or north-east) direction (↗️).
Upstream Upstream
-------- --------
[![upstream](README.d/upstream.png)](https://rsc.eworm.de/) [rsc.eworm.de](https://rsc.eworm.de/)
URL: [![upstream](general/qr-code.png)](https://rsc.eworm.de/)
[GitHub.com](https://github.com/eworm-de/routeros-scripts#routeros-scripts)
Mirror: ### Code hosting
[eworm.de](https://git.eworm.de/cgit/routeros-scripts/about/)
[GitLab.com](https://gitlab.com/eworm-de/routeros-scripts#routeros-scripts) * [git.eworm.de](https://git.eworm.de/cgit/routeros-scripts/about/)
* [GitHub.com](https://github.com/eworm-de/routeros-scripts#routeros-scripts)
* [GitLab.com](https://gitlab.com/eworm-de/routeros-scripts#routeros-scripts)
--- ---
[⬆️ Go back to top](#top) [⬆️ Go back to top](#top)

View file

@ -1,20 +1,20 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: accesslist-duplicates.capsman # RouterOS script: accesslist-duplicates.capsman
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2018-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# print duplicate antries in wireless access list # print duplicate antries in wireless access list
# https://rsc.eworm.de/doc/accesslist-duplicates.md # https://rsc.eworm.de/doc/accesslist-duplicates.md
# #
# !! Do not edit this file, it is generated from template! # !! Do not edit this file, it is generated from template!
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:local Seen ({}); :local Seen ({});
@ -22,7 +22,7 @@
:foreach AccList in=[ /caps-man/access-list/find where mac-address!="00:00:00:00:00:00" ] do={ :foreach AccList in=[ /caps-man/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
:local Mac [ /caps-man/access-list/get $AccList mac-address ]; :local Mac [ /caps-man/access-list/get $AccList mac-address ];
:if ($Seen->$Mac = 1) do={ :if ($Seen->$Mac = 1) do={
/caps-man/access-list/print where mac-address=$Mac; /caps-man/access-list/print without-paging where mac-address=$Mac;
:local Remove [ :tonum [ /terminal/ask prompt="\nNumeric id to remove, any key to skip!" ] ]; :local Remove [ :tonum [ /terminal/ask prompt="\nNumeric id to remove, any key to skip!" ] ];
:if ([ :typeof $Remove ] = "num") do={ :if ([ :typeof $Remove ] = "num") do={
@ -32,6 +32,6 @@
} }
:set ($Seen->$Mac) 1; :set ($Seen->$Mac) 1;
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,20 +1,20 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: accesslist-duplicates.local # RouterOS script: accesslist-duplicates.local
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2018-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# print duplicate antries in wireless access list # print duplicate antries in wireless access list
# https://rsc.eworm.de/doc/accesslist-duplicates.md # https://rsc.eworm.de/doc/accesslist-duplicates.md
# #
# !! Do not edit this file, it is generated from template! # !! Do not edit this file, it is generated from template!
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:local Seen ({}); :local Seen ({});
@ -22,7 +22,7 @@
:foreach AccList in=[ /interface/wireless/access-list/find where mac-address!="00:00:00:00:00:00" ] do={ :foreach AccList in=[ /interface/wireless/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
:local Mac [ /interface/wireless/access-list/get $AccList mac-address ]; :local Mac [ /interface/wireless/access-list/get $AccList mac-address ];
:if ($Seen->$Mac = 1) do={ :if ($Seen->$Mac = 1) do={
/interface/wireless/access-list/print where mac-address=$Mac; /interface/wireless/access-list/print without-paging where mac-address=$Mac;
:local Remove [ :tonum [ /terminal/ask prompt="\nNumeric id to remove, any key to skip!" ] ]; :local Remove [ :tonum [ /terminal/ask prompt="\nNumeric id to remove, any key to skip!" ] ];
:if ([ :typeof $Remove ] = "num") do={ :if ([ :typeof $Remove ] = "num") do={
@ -32,6 +32,6 @@
} }
:set ($Seen->$Mac) 1; :set ($Seen->$Mac) 1;
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,9 +1,9 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: accesslist-duplicates%TEMPL% # RouterOS script: accesslist-duplicates%TEMPL%
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2018-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# print duplicate antries in wireless access list # print duplicate antries in wireless access list
# https://rsc.eworm.de/doc/accesslist-duplicates.md # https://rsc.eworm.de/doc/accesslist-duplicates.md
@ -11,11 +11,11 @@
# !! This is just a template to generate the real script! # !! This is just a template to generate the real script!
# !! Pattern '%TEMPL%' is replaced, paths are filtered. # !! Pattern '%TEMPL%' is replaced, paths are filtered.
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:local Seen ({}); :local Seen ({});
@ -27,9 +27,9 @@
:local Mac [ /interface/wifi/access-list/get $AccList mac-address ]; :local Mac [ /interface/wifi/access-list/get $AccList mac-address ];
:local Mac [ /interface/wireless/access-list/get $AccList mac-address ]; :local Mac [ /interface/wireless/access-list/get $AccList mac-address ];
:if ($Seen->$Mac = 1) do={ :if ($Seen->$Mac = 1) do={
/caps-man/access-list/print where mac-address=$Mac; /caps-man/access-list/print without-paging where mac-address=$Mac;
/interface/wifi/access-list/print where mac-address=$Mac; /interface/wifi/access-list/print without-paging where mac-address=$Mac;
/interface/wireless/access-list/print where mac-address=$Mac; /interface/wireless/access-list/print without-paging where mac-address=$Mac;
:local Remove [ :tonum [ /terminal/ask prompt="\nNumeric id to remove, any key to skip!" ] ]; :local Remove [ :tonum [ /terminal/ask prompt="\nNumeric id to remove, any key to skip!" ] ];
:if ([ :typeof $Remove ] = "num") do={ :if ([ :typeof $Remove ] = "num") do={
@ -41,6 +41,6 @@
} }
:set ($Seen->$Mac) 1; :set ($Seen->$Mac) 1;
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,20 +1,20 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: accesslist-duplicates.wifi # RouterOS script: accesslist-duplicates.wifi
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2018-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# print duplicate antries in wireless access list # print duplicate antries in wireless access list
# https://rsc.eworm.de/doc/accesslist-duplicates.md # https://rsc.eworm.de/doc/accesslist-duplicates.md
# #
# !! Do not edit this file, it is generated from template! # !! Do not edit this file, it is generated from template!
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:local Seen ({}); :local Seen ({});
@ -22,7 +22,7 @@
:foreach AccList in=[ /interface/wifi/access-list/find where mac-address!="00:00:00:00:00:00" ] do={ :foreach AccList in=[ /interface/wifi/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
:local Mac [ /interface/wifi/access-list/get $AccList mac-address ]; :local Mac [ /interface/wifi/access-list/get $AccList mac-address ];
:if ($Seen->$Mac = 1) do={ :if ($Seen->$Mac = 1) do={
/interface/wifi/access-list/print where mac-address=$Mac; /interface/wifi/access-list/print without-paging where mac-address=$Mac;
:local Remove [ :tonum [ /terminal/ask prompt="\nNumeric id to remove, any key to skip!" ] ]; :local Remove [ :tonum [ /terminal/ask prompt="\nNumeric id to remove, any key to skip!" ] ];
:if ([ :typeof $Remove ] = "num") do={ :if ([ :typeof $Remove ] = "num") do={
@ -32,6 +32,6 @@
} }
:set ($Seen->$Mac) 1; :set ($Seen->$Mac) 1;
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,19 +1,19 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: backup-cloud # RouterOS script: backup-cloud
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# provides: backup-script, order=40 # provides: backup-script, order=40
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# upload backup to MikroTik cloud # upload backup to MikroTik cloud
# https://rsc.eworm.de/doc/backup-cloud.md # https://rsc.eworm.de/doc/backup-cloud.md
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global BackupRandomDelay; :global BackupRandomDelay;
@ -26,6 +26,7 @@
:global LogPrint; :global LogPrint;
:global MkDir; :global MkDir;
:global RandomDelay; :global RandomDelay;
:global RmDir;
:global ScriptFromTerminal; :global ScriptFromTerminal;
:global ScriptLock; :global ScriptLock;
:global SendNotification2; :global SendNotification2;
@ -97,7 +98,7 @@
$LogPrint error $ScriptName ("Failed uploading backup for " . $Identity . " to cloud!"); $LogPrint error $ScriptName ("Failed uploading backup for " . $Identity . " to cloud!");
:set PackagesUpdateBackupFailure true; :set PackagesUpdateBackupFailure true;
} }
/file/remove "tmpfs/backup-cloud"; $RmDir "tmpfs/backup-cloud";
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,19 +1,19 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: backup-email # RouterOS script: backup-email
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# provides: backup-script, order=20 # provides: backup-script, order=20
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# create and email backup and config file # create and email backup and config file
# https://rsc.eworm.de/doc/backup-email.md # https://rsc.eworm.de/doc/backup-email.md
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global BackupPassword; :global BackupPassword;
@ -27,6 +27,7 @@
:global CleanName; :global CleanName;
:global DeviceInfo; :global DeviceInfo;
:global FileExists;
:global FormatLine; :global FormatLine;
:global LogPrint; :global LogPrint;
:global MkDir; :global MkDir;
@ -124,17 +125,19 @@
attach=$Attach; remove-attach=true }); attach=$Attach; remove-attach=true });
# wait for the mail to be sent # wait for the mail to be sent
:local I 0; :do {
:while ([ :len [ /file/find where name ~ ($FilePath . "\\.(backup|rsc)\$") ] ] > 0) do={ :retry {
:if ($I >= 120) do={ :if ([ $FileExists ($FilePath . ".conf") ".conf file" ] = true || \
$LogPrint warning $ScriptName ("Files are still available, sending e-mail failed."); [ $FileExists ($FilePath . ".backup") "backup" ] = true || \
:set PackagesUpdateBackupFailure true; [ $FileExists ($FilePath . ".rsc") "script" ] = true) do={
:set ExitOK true; :error "Files are still available.";
:error false; }
} } delay=1s max=120;
:delay 1s; } on-error={
:set I ($I + 1); $LogPrint warning $ScriptName ("Files are still available, sending e-mail failed.");
:set PackagesUpdateBackupFailure true;
} }
} on-error={ # do not remove the files here, as the mail is still queued!
:global ExitError; $ExitError $ExitOK [ :jobname ]; } do={
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,20 +1,20 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: backup-partition # RouterOS script: backup-partition
# Copyright (c) 2022-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2022-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# provides: backup-script, order=70 # provides: backup-script, order=70
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# requires device-mode, scheduler # requires device-mode, scheduler
# #
# save configuration to fallback partition # save configuration to fallback partition
# https://rsc.eworm.de/doc/backup-partition.md # https://rsc.eworm.de/doc/backup-partition.md
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global BackupPartitionCopyBeforeFeatureUpdate; :global BackupPartitionCopyBeforeFeatureUpdate;
@ -32,14 +32,15 @@
:global LogPrint; :global LogPrint;
:do { :onerror Err {
/partitions/copy-to $FallbackTo; /partitions/copy-to $FallbackTo;
$LogPrint info $ScriptName ("Copied RouterOS to partition '" . $FallbackToName . "'."); $LogPrint info $ScriptName ("Copied RouterOS to partition '" . $FallbackToName . "'.");
:return true; } do={
} on-error={ $LogPrint error $ScriptName ("Failed copying RouterOS to partition '" . \
$LogPrint error $ScriptName ("Failed copying RouterOS to partition '" . $FallbackToName . "'!"); $FallbackToName . "': " . $Err);
:return false; :return false;
} }
:return true;
} }
:if ([ $ScriptLock $ScriptName ] = false) do={ :if ([ $ScriptLock $ScriptName ] = false) do={
@ -107,20 +108,21 @@
} }
} }
:do { :onerror Err {
/system/scheduler/add start-time=startup name="running-from-backup-partition" \ /system/scheduler/add start-time=startup name="running-from-backup-partition" \
on-event=(":log warning (\"Running from partition '\" . " . \ on-event=(":log warning (\"Running from partition '\" . " . \
"[ /partitions/get [ find where running ] name ] . \"'!\")"); "[ /partitions/get [ find where running ] name ] . \"'!\")");
/partitions/save-config-to $FallbackTo; /partitions/save-config-to $FallbackTo;
/system/scheduler/remove "running-from-backup-partition"; /system/scheduler/remove "running-from-backup-partition";
$LogPrint info $ScriptName ("Saved configuration to partition '" . $FallbackToName . "'."); $LogPrint info $ScriptName ("Saved configuration to partition '" . $FallbackToName . "'.");
} on-error={ } do={
/system/scheduler/remove [ find where name="running-from-backup-partition" ]; /system/scheduler/remove [ find where name="running-from-backup-partition" ];
$LogPrint error $ScriptName ("Failed saving configuration to partition '" . $FallbackToName . "'!"); $LogPrint error $ScriptName ("Failed saving configuration to partition '" . \
$FallbackToName . "': " . $Err);
:set PackagesUpdateBackupFailure true; :set PackagesUpdateBackupFailure true;
:set ExitOK true; :set ExitOK true;
:error false; :error false;
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,20 +1,20 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: backup-upload # RouterOS script: backup-upload
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# provides: backup-script, order=50 # provides: backup-script, order=50
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# requires device-mode, fetch # requires device-mode, fetch
# #
# create and upload backup and config file # create and upload backup and config file
# https://rsc.eworm.de/doc/backup-upload.md # https://rsc.eworm.de/doc/backup-upload.md
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global BackupPassword; :global BackupPassword;
@ -35,6 +35,8 @@
:global LogPrint; :global LogPrint;
:global MkDir; :global MkDir;
:global RandomDelay; :global RandomDelay;
:global RmDir;
:global RmFile;
:global ScriptFromTerminal; :global ScriptFromTerminal;
:global ScriptLock; :global ScriptLock;
:global SendNotification2; :global SendNotification2;
@ -88,18 +90,18 @@
/system/backup/save encryption=aes-sha256 name=$FilePath password=$BackupPassword; /system/backup/save encryption=aes-sha256 name=$FilePath password=$BackupPassword;
$WaitForFile ($FilePath . ".backup"); $WaitForFile ($FilePath . ".backup");
:do { :onerror Err {
/tool/fetch upload=yes url=($BackupUploadUrl . "/" . $FileName . ".backup") \ /tool/fetch upload=yes url=($BackupUploadUrl . "/" . $FileName . ".backup") \
user=$BackupUploadUser password=$BackupUploadPass src-path=($FilePath . ".backup"); user=$BackupUploadUser password=$BackupUploadPass src-path=($FilePath . ".backup");
:set BackupFile [ /file/get ($FilePath . ".backup") ]; :set BackupFile [ /file/get ($FilePath . ".backup") ];
:set ($BackupFile->"name") ($FileName . ".backup"); :set ($BackupFile->"name") ($FileName . ".backup");
} on-error={ } do={
$LogPrint error $ScriptName ("Uploading backup file failed!"); $LogPrint error $ScriptName ("Uploading backup file failed: " . $Err);
:set BackupFile "failed"; :set BackupFile "failed";
:set Failed 1; :set Failed 1;
} }
/file/remove ($FilePath . ".backup"); $RmFile ($FilePath . ".backup");
} }
# create configuration export # create configuration export
@ -107,18 +109,18 @@
/export terse show-sensitive file=$FilePath; /export terse show-sensitive file=$FilePath;
$WaitForFile ($FilePath . ".rsc"); $WaitForFile ($FilePath . ".rsc");
:do { :onerror Err {
/tool/fetch upload=yes url=($BackupUploadUrl . "/" . $FileName . ".rsc") \ /tool/fetch upload=yes url=($BackupUploadUrl . "/" . $FileName . ".rsc") \
user=$BackupUploadUser password=$BackupUploadPass src-path=($FilePath . ".rsc"); user=$BackupUploadUser password=$BackupUploadPass src-path=($FilePath . ".rsc");
:set ExportFile [ /file/get ($FilePath . ".rsc") ]; :set ExportFile [ /file/get ($FilePath . ".rsc") ];
:set ($ExportFile->"name") ($FileName . ".rsc"); :set ($ExportFile->"name") ($FileName . ".rsc");
} on-error={ } do={
$LogPrint error $ScriptName ("Uploading configuration export failed!"); $LogPrint error $ScriptName ("Uploading configuration export failed: " . $Err);
:set ExportFile "failed"; :set ExportFile "failed";
:set Failed 1; :set Failed 1;
} }
/file/remove ($FilePath . ".rsc"); $RmFile ($FilePath . ".rsc");
} }
# global-config-overlay # global-config-overlay
@ -128,18 +130,18 @@
file=($FilePath . ".conf\00"); file=($FilePath . ".conf\00");
$WaitForFile ($FilePath . ".conf"); $WaitForFile ($FilePath . ".conf");
:do { :onerror Err {
/tool/fetch upload=yes url=($BackupUploadUrl . "/" . $FileName . ".conf") \ /tool/fetch upload=yes url=($BackupUploadUrl . "/" . $FileName . ".conf") \
user=$BackupUploadUser password=$BackupUploadPass src-path=($FilePath . ".conf"); user=$BackupUploadUser password=$BackupUploadPass src-path=($FilePath . ".conf");
:set ConfigFile [ /file/get ($FilePath . ".conf") ]; :set ConfigFile [ /file/get ($FilePath . ".conf") ];
:set ($ConfigFile->"name") ($FileName . ".conf"); :set ($ConfigFile->"name") ($FileName . ".conf");
} on-error={ } do={
$LogPrint error $ScriptName ("Uploading global-config-overlay failed!"); $LogPrint error $ScriptName ("Uploading global-config-overlay failed: " . $Err);
:set ConfigFile "failed"; :set ConfigFile "failed";
:set Failed 1; :set Failed 1;
} }
/file/remove ($FilePath . ".conf"); $RmFile ($FilePath . ".conf");
} }
:local FileInfo do={ :local FileInfo do={
@ -170,7 +172,7 @@
:if ($Failed = 1) do={ :if ($Failed = 1) do={
:set PackagesUpdateBackupFailure true; :set PackagesUpdateBackupFailure true;
} }
/file/remove $DirName; $RmDir $DirName;
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,27 +1,29 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: capsman-download-packages.capsman # RouterOS script: capsman-download-packages.capsman
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2018-2026 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de> # Michael Gisbers <michael@gisbers.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# download and cleanup packages for CAP installation from CAPsMAN # download and cleanup packages for CAP installation from CAPsMAN
# https://rsc.eworm.de/doc/capsman-download-packages.md # https://rsc.eworm.de/doc/capsman-download-packages.md
# #
# !! Do not edit this file, it is generated from template! # !! Do not edit this file, it is generated from template!
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global CleanFilePath; :global CleanFilePath;
:global DownloadPackage; :global DownloadPackage;
:global FileGet;
:global LogPrint; :global LogPrint;
:global MkDir; :global MkDir;
:global RmFile;
:global ScriptLock; :global ScriptLock;
:global WaitFullyConnected; :global WaitFullyConnected;
@ -41,7 +43,7 @@
:error false; :error false;
} }
:if ([ :len [ /file/find where name=$PackagePath type="directory" ] ] = 0) do={ :if ([ $FileGet $PackagePath ] = false) do={
:if ([ $MkDir $PackagePath ] = false) do={ :if ([ $MkDir $PackagePath ] = false) do={
$LogPrint warning $ScriptName ("Creating directory at CAPsMAN package path (" . \ $LogPrint warning $ScriptName ("Creating directory at CAPsMAN package path (" . \
$PackagePath . ") failed!"); $PackagePath . ") failed!");
@ -52,7 +54,7 @@
"). Please place your packages!"); "). Please place your packages!");
} }
:foreach Package in=[ /file/find where type=package \ :foreach Package in=[ /file/find where type="package" \
package-version!=$InstalledVersion name~("^" . $PackagePath) ] do={ package-version!=$InstalledVersion name~("^" . $PackagePath) ] do={
:local File [ /file/get $Package ]; :local File [ /file/get $Package ];
:if ($File->"package-architecture" = "mips") do={ :if ($File->"package-architecture" = "mips") do={
@ -61,11 +63,11 @@
:if ([ $DownloadPackage ($File->"package-name") $InstalledVersion \ :if ([ $DownloadPackage ($File->"package-name") $InstalledVersion \
($File->"package-architecture") $PackagePath ] = true) do={ ($File->"package-architecture") $PackagePath ] = true) do={
:set Updated true; :set Updated true;
/file/remove $Package; $RmFile ($File->"name");
} }
} }
:if ([ :len [ /file/find where type=package name~("^" . $PackagePath) ] ] = 0) do={ :if ([ :len [ /file/find where type="package" name~("^" . $PackagePath) ] ] = 0) do={
$LogPrint info $ScriptName ("No packages available, downloading default set."); $LogPrint info $ScriptName ("No packages available, downloading default set.");
:foreach Arch in={ "arm"; "mipsbe" } do={ :foreach Arch in={ "arm"; "mipsbe" } do={
:foreach Package in={ "routeros"; "wireless" } do={ :foreach Package in={ "routeros"; "wireless" } do={
@ -86,6 +88,6 @@
/caps-man/remote-cap/upgrade [ find where version!=$InstalledVersion ]; /caps-man/remote-cap/upgrade [ find where version!=$InstalledVersion ];
} }
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,10 +1,10 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: capsman-download-packages%TEMPL% # RouterOS script: capsman-download-packages%TEMPL%
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2018-2026 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de> # Michael Gisbers <michael@gisbers.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# download and cleanup packages for CAP installation from CAPsMAN # download and cleanup packages for CAP installation from CAPsMAN
# https://rsc.eworm.de/doc/capsman-download-packages.md # https://rsc.eworm.de/doc/capsman-download-packages.md
@ -12,17 +12,19 @@
# !! This is just a template to generate the real script! # !! This is just a template to generate the real script!
# !! Pattern '%TEMPL%' is replaced, paths are filtered. # !! Pattern '%TEMPL%' is replaced, paths are filtered.
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global CleanFilePath; :global CleanFilePath;
:global DownloadPackage; :global DownloadPackage;
:global FileGet;
:global LogPrint; :global LogPrint;
:global MkDir; :global MkDir;
:global RmFile;
:global ScriptLock; :global ScriptLock;
:global WaitFullyConnected; :global WaitFullyConnected;
@ -43,7 +45,7 @@
:error false; :error false;
} }
:if ([ :len [ /file/find where name=$PackagePath type="directory" ] ] = 0) do={ :if ([ $FileGet $PackagePath ] = false) do={
:if ([ $MkDir $PackagePath ] = false) do={ :if ([ $MkDir $PackagePath ] = false) do={
$LogPrint warning $ScriptName ("Creating directory at CAPsMAN package path (" . \ $LogPrint warning $ScriptName ("Creating directory at CAPsMAN package path (" . \
$PackagePath . ") failed!"); $PackagePath . ") failed!");
@ -54,7 +56,7 @@
"). Please place your packages!"); "). Please place your packages!");
} }
:foreach Package in=[ /file/find where type=package \ :foreach Package in=[ /file/find where type="package" \
package-version!=$InstalledVersion name~("^" . $PackagePath) ] do={ package-version!=$InstalledVersion name~("^" . $PackagePath) ] do={
:local File [ /file/get $Package ]; :local File [ /file/get $Package ];
:if ($File->"package-architecture" = "mips") do={ :if ($File->"package-architecture" = "mips") do={
@ -63,11 +65,11 @@
:if ([ $DownloadPackage ($File->"package-name") $InstalledVersion \ :if ([ $DownloadPackage ($File->"package-name") $InstalledVersion \
($File->"package-architecture") $PackagePath ] = true) do={ ($File->"package-architecture") $PackagePath ] = true) do={
:set Updated true; :set Updated true;
/file/remove $Package; $RmFile ($File->"name");
} }
} }
:if ([ :len [ /file/find where type=package name~("^" . $PackagePath) ] ] = 0) do={ :if ([ :len [ /file/find where type="package" name~("^" . $PackagePath) ] ] = 0) do={
$LogPrint info $ScriptName ("No packages available, downloading default set."); $LogPrint info $ScriptName ("No packages available, downloading default set.");
# NOT /interface/wifi/ # # NOT /interface/wifi/ #
:foreach Arch in={ "arm"; "mipsbe" } do={ :foreach Arch in={ "arm"; "mipsbe" } do={
@ -97,6 +99,6 @@
/interface/wifi/capsman/remote-cap/upgrade [ find where version!=$InstalledVersion ]; /interface/wifi/capsman/remote-cap/upgrade [ find where version!=$InstalledVersion ];
} }
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,27 +1,29 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: capsman-download-packages.wifi # RouterOS script: capsman-download-packages.wifi
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2018-2026 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de> # Michael Gisbers <michael@gisbers.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# download and cleanup packages for CAP installation from CAPsMAN # download and cleanup packages for CAP installation from CAPsMAN
# https://rsc.eworm.de/doc/capsman-download-packages.md # https://rsc.eworm.de/doc/capsman-download-packages.md
# #
# !! Do not edit this file, it is generated from template! # !! Do not edit this file, it is generated from template!
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global CleanFilePath; :global CleanFilePath;
:global DownloadPackage; :global DownloadPackage;
:global FileGet;
:global LogPrint; :global LogPrint;
:global MkDir; :global MkDir;
:global RmFile;
:global ScriptLock; :global ScriptLock;
:global WaitFullyConnected; :global WaitFullyConnected;
@ -41,7 +43,7 @@
:error false; :error false;
} }
:if ([ :len [ /file/find where name=$PackagePath type="directory" ] ] = 0) do={ :if ([ $FileGet $PackagePath ] = false) do={
:if ([ $MkDir $PackagePath ] = false) do={ :if ([ $MkDir $PackagePath ] = false) do={
$LogPrint warning $ScriptName ("Creating directory at CAPsMAN package path (" . \ $LogPrint warning $ScriptName ("Creating directory at CAPsMAN package path (" . \
$PackagePath . ") failed!"); $PackagePath . ") failed!");
@ -52,7 +54,7 @@
"). Please place your packages!"); "). Please place your packages!");
} }
:foreach Package in=[ /file/find where type=package \ :foreach Package in=[ /file/find where type="package" \
package-version!=$InstalledVersion name~("^" . $PackagePath) ] do={ package-version!=$InstalledVersion name~("^" . $PackagePath) ] do={
:local File [ /file/get $Package ]; :local File [ /file/get $Package ];
:if ($File->"package-architecture" = "mips") do={ :if ($File->"package-architecture" = "mips") do={
@ -61,11 +63,11 @@
:if ([ $DownloadPackage ($File->"package-name") $InstalledVersion \ :if ([ $DownloadPackage ($File->"package-name") $InstalledVersion \
($File->"package-architecture") $PackagePath ] = true) do={ ($File->"package-architecture") $PackagePath ] = true) do={
:set Updated true; :set Updated true;
/file/remove $Package; $RmFile ($File->"name");
} }
} }
:if ([ :len [ /file/find where type=package name~("^" . $PackagePath) ] ] = 0) do={ :if ([ :len [ /file/find where type="package" name~("^" . $PackagePath) ] ] = 0) do={
$LogPrint info $ScriptName ("No packages available, downloading default set."); $LogPrint info $ScriptName ("No packages available, downloading default set.");
:foreach Arch in={ "arm"; "arm64" } do={ :foreach Arch in={ "arm"; "arm64" } do={
:local Packages { "arm"={ "routeros"; "wifi-qcom"; "wifi-qcom-ac" }; :local Packages { "arm"={ "routeros"; "wifi-qcom"; "wifi-qcom-ac" };
@ -88,6 +90,6 @@
/interface/wifi/capsman/remote-cap/upgrade [ find where version!=$InstalledVersion ]; /interface/wifi/capsman/remote-cap/upgrade [ find where version!=$InstalledVersion ];
} }
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,22 +1,22 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: capsman-rolling-upgrade.capsman # RouterOS script: capsman-rolling-upgrade.capsman
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2018-2026 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de> # Michael Gisbers <michael@gisbers.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# provides: capsman-rolling-upgrade.capsman # provides: capsman-rolling-upgrade.capsman
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# upgrade CAPs one after another # upgrade CAPs one after another
# https://rsc.eworm.de/doc/capsman-rolling-upgrade.md # https://rsc.eworm.de/doc/capsman-rolling-upgrade.md
# #
# !! Do not edit this file, it is generated from template! # !! Do not edit this file, it is generated from template!
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global LogPrint; :global LogPrint;
@ -45,6 +45,6 @@
:delay ($Delay . "s"); :delay ($Delay . "s");
} }
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,11 +1,11 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: capsman-rolling-upgrade%TEMPL% # RouterOS script: capsman-rolling-upgrade%TEMPL%
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2018-2026 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de> # Michael Gisbers <michael@gisbers.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# provides: capsman-rolling-upgrade%TEMPL% # provides: capsman-rolling-upgrade%TEMPL%
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# upgrade CAPs one after another # upgrade CAPs one after another
# https://rsc.eworm.de/doc/capsman-rolling-upgrade.md # https://rsc.eworm.de/doc/capsman-rolling-upgrade.md
@ -13,11 +13,11 @@
# !! This is just a template to generate the real script! # !! This is just a template to generate the real script!
# !! Pattern '%TEMPL%' is replaced, paths are filtered. # !! Pattern '%TEMPL%' is replaced, paths are filtered.
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global LogPrint; :global LogPrint;
@ -53,6 +53,6 @@
:delay ($Delay . "s"); :delay ($Delay . "s");
} }
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,22 +1,22 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: capsman-rolling-upgrade.wifi # RouterOS script: capsman-rolling-upgrade.wifi
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2018-2026 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de> # Michael Gisbers <michael@gisbers.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# provides: capsman-rolling-upgrade.wifi # provides: capsman-rolling-upgrade.wifi
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# upgrade CAPs one after another # upgrade CAPs one after another
# https://rsc.eworm.de/doc/capsman-rolling-upgrade.md # https://rsc.eworm.de/doc/capsman-rolling-upgrade.md
# #
# !! Do not edit this file, it is generated from template! # !! Do not edit this file, it is generated from template!
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global LogPrint; :global LogPrint;
@ -46,6 +46,6 @@
:delay ($Delay . "s"); :delay ($Delay . "s");
} }
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,18 +1,18 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: certificate-renew-issued # RouterOS script: certificate-renew-issued
# Copyright (c) 2019-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2019-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# renew locally issued certificates # renew locally issued certificates
# https://rsc.eworm.de/doc/certificate-renew-issued.md # https://rsc.eworm.de/doc/certificate-renew-issued.md
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global CertIssuedExportPass; :global CertIssuedExportPass;
@ -47,6 +47,6 @@
$LogPrint info $ScriptName ("Issued a new certificate for '" . $CertVal->"common-name" . "'."); $LogPrint info $ScriptName ("Issued a new certificate for '" . $CertVal->"common-name" . "'.");
} }
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,28 +0,0 @@
# Issuer: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R3
# Subject: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R3
# Label: "GlobalSign Root CA - R3"
# Serial: 4835703278459759426209954
# MD5 Fingerprint: c5:df:b8:49:ca:05:13:55:ee:2d:ba:1a:c3:3e:b0:28
# SHA1 Fingerprint: d6:9b:56:11:48:f0:1c:77:c5:45:78:c1:09:26:df:5b:85:69:76:ad
# SHA256 Fingerprint: cb:b5:22:d7:b7:f1:27:ad:6a:01:13:86:5b:df:1c:d4:10:2e:7d:07:59:af:63:5a:7c:f4:72:0d:c9:63:c5:3b
-----BEGIN CERTIFICATE-----
MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4G
A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNp
Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4
MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEG
A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWtiHL8
RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsT
gHeMCOFJ0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmm
KPZpO/bLyCiR5Z2KYVc3rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zd
QQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjlOCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZ
XriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2xmmFghcCAwEAAaNCMEAw
DgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI/wS3+o
LkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZU
RUm7lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMp
jjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK
6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX
mcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs
Mx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH
WD9f
-----END CERTIFICATE-----

View file

@ -15,7 +15,7 @@ DOMAINS_DUAL = \
git.eworm.de/ISRG-Root-X2 \ git.eworm.de/ISRG-Root-X2 \
lists.blocklist.de/Certum-Trusted-Network-CA \ lists.blocklist.de/Certum-Trusted-Network-CA \
matrix.org/GTS-Root-R4 \ matrix.org/GTS-Root-R4 \
raw.githubusercontent.com/DigiCert-Global-Root-G2 \ raw.githubusercontent.com/USERTrust-RSA-Certification-Authority \
rsc.eworm.de/ISRG-Root-X2 \ rsc.eworm.de/ISRG-Root-X2 \
upgrade.mikrotik.com/ISRG-Root-X1 upgrade.mikrotik.com/ISRG-Root-X1
DOMAINS_IPV4 = \ DOMAINS_IPV4 = \
@ -23,12 +23,10 @@ DOMAINS_IPV4 = \
8.8.8.8/GTS-Root-R1 \ 8.8.8.8/GTS-Root-R1 \
9.9.9.9/DigiCert-Global-Root-G3 \ 9.9.9.9/DigiCert-Global-Root-G3 \
api.mullvad.net/ISRG-Root-X1 \ api.mullvad.net/ISRG-Root-X1 \
feodotracker.abuse.ch/GlobalSign \
ipv4.showipv6.de/ISRG-Root-X1 \ ipv4.showipv6.de/ISRG-Root-X1 \
ipv4.tunnelbroker.net/Starfield-Root-Certificate-Authority-G2 \ ipv4.tunnelbroker.net/Starfield-Root-Certificate-Authority-G2 \
mkcert.org/ISRG-Root-X1 \ mkcert.org/ISRG-Root-X1 \
ntfy.sh/ISRG-Root-X1 \ ntfy.sh/ISRG-Root-X1 \
sslbl.abuse.ch/GlobalSign \
www.dshield.org/ISRG-Root-X1 \ www.dshield.org/ISRG-Root-X1 \
www.spamhaus.org/GTS-Root-R4 www.spamhaus.org/GTS-Root-R4
DOMAINS_IPV6 = \ DOMAINS_IPV6 = \

View file

@ -0,0 +1,41 @@
# Issuer: CN=USERTrust RSA Certification Authority O=The USERTRUST Network
# Subject: CN=USERTrust RSA Certification Authority O=The USERTRUST Network
# Label: "USERTrust RSA Certification Authority"
# Serial: 2645093764781058787591871645665788717
# MD5 Fingerprint: 1b:fe:69:d1:91:b7:19:33:a3:72:a8:0f:e1:55:e5:b5
# SHA1 Fingerprint: 2b:8f:1b:57:33:0d:bb:a2:d0:7a:6c:51:f7:0e:e9:0d:da:b9:ad:8e
# SHA256 Fingerprint: e7:93:c9:b0:2f:d8:aa:13:e2:1c:31:22:8a:cc:b0:81:19:64:3b:74:9c:89:89:64:b1:74:6d:46:c3:d4:cb:d2
-----BEGIN CERTIFICATE-----
MIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCB
iDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0pl
cnNleSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNV
BAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTAw
MjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UEBhMCVVMxEzARBgNV
BAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU
aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2Vy
dGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIK
AoICAQCAEmUXNg7D2wiz0KxXDXbtzSfTTK1Qg2HiqiBNCS1kCdzOiZ/MPans9s/B
3PHTsdZ7NygRK0faOca8Ohm0X6a9fZ2jY0K2dvKpOyuR+OJv0OwWIJAJPuLodMkY
tJHUYmTbf6MG8YgYapAiPLz+E/CHFHv25B+O1ORRxhFnRghRy4YUVD+8M/5+bJz/
Fp0YvVGONaanZshyZ9shZrHUm3gDwFA66Mzw3LyeTP6vBZY1H1dat//O+T23LLb2
VN3I5xI6Ta5MirdcmrS3ID3KfyI0rn47aGYBROcBTkZTmzNg95S+UzeQc0PzMsNT
79uq/nROacdrjGCT3sTHDN/hMq7MkztReJVni+49Vv4M0GkPGw/zJSZrM233bkf6
c0Plfg6lZrEpfDKEY1WJxA3Bk1QwGROs0303p+tdOmw1XNtB1xLaqUkL39iAigmT
Yo61Zs8liM2EuLE/pDkP2QKe6xJMlXzzawWpXhaDzLhn4ugTncxbgtNMs+1b/97l
c6wjOy0AvzVVdAlJ2ElYGn+SNuZRkg7zJn0cTRe8yexDJtC/QV9AqURE9JnnV4ee
UB9XVKg+/XRjL7FQZQnmWEIuQxpMtPAlR1n6BB6T1CZGSlCBst6+eLf8ZxXhyVeE
Hg9j1uliutZfVS7qXMYoCAQlObgOK6nyTJccBz8NUvXt7y+CDwIDAQABo0IwQDAd
BgNVHQ4EFgQUU3m/WqorSs9UgOHYm8Cd8rIDZsswDgYDVR0PAQH/BAQDAgEGMA8G
A1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAFzUfA3P9wF9QZllDHPF
Up/L+M+ZBn8b2kMVn54CVVeWFPFSPCeHlCjtHzoBN6J2/FNQwISbxmtOuowhT6KO
VWKR82kV2LyI48SqC/3vqOlLVSoGIG1VeCkZ7l8wXEskEVX/JJpuXior7gtNn3/3
ATiUFJVDBwn7YKnuHKsSjKCaXqeYalltiz8I+8jRRa8YFWSQEg9zKC7F4iRO/Fjs
8PRF/iKz6y+O0tlFYQXBl2+odnKPi4w2r78NBc5xjeambx9spnFixdjQg3IM8WcR
iQycE0xyNN+81XHfqnHd4blsjDwSXWXavVcStkNr/+XeTWYRUc+ZruwXtuhxkYze
Sf7dNXGiFSeUHM9h4ya7b6NnJSFd5t0dCy5oGzuCr+yDZ4XUmFF0sbmZgIn/f3gZ
XHlKYC6SQK5MNyosycdiyA5d9zZbyuAlJQG03RoHnHcAP9Dc1ew91Pq7P8yF1m9/
qS3fuQL39ZeatTXaw2ewh0qpKJ4jjv9cJ2vhsE/zB+4ALtRZh8tSQZXq9EfX7mRB
VXyNWQKV3WKdwrnuWih0hKWbt5DHDAff9Yk2dDLWKMGwsAvgnEzDHNb842m1R0aB
L6KCq9NjRHDEjf8tM7qtj3u1cIiuPhnPQCjY/MiQu12ZIvVS5ljFH4gxQ+6IHdfG
jjxDah2nGN59PRbxYvnKkKj9
-----END CERTIFICATE-----

View file

@ -1,19 +1,19 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: check-certificates # RouterOS script: check-certificates
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# requires device-mode, fetch # requires device-mode, fetch
# #
# check for certificate validity # check for certificate validity
# https://rsc.eworm.de/doc/check-certificates.md # https://rsc.eworm.de/doc/check-certificates.md
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global CertRenewTime; :global CertRenewTime;
@ -21,7 +21,7 @@
:global CertWarnTime; :global CertWarnTime;
:global Identity; :global Identity;
:global CertificateAvailable :global CertificateAvailable;
:global EscapeForRegEx; :global EscapeForRegEx;
:global IfThenElse; :global IfThenElse;
:global LogPrint; :global LogPrint;
@ -44,26 +44,32 @@
:global EscapeForRegEx; :global EscapeForRegEx;
:global FetchUserAgentStr; :global FetchUserAgentStr;
:global LogPrint; :global LogPrint;
:global RmFile;
:global UrlEncode; :global UrlEncode;
:global WaitForFile; :global WaitForFile;
:local Return false; :foreach Type in={ "p12"; "pem" } do={
:local CertFileName ([ $UrlEncode $FetchName ] . "." . $Type);
$LogPrint debug $ScriptName ("Trying type '" . $Type . "' for '" . $CertName . \
"' (file '" . $CertFileName . "')...");
:foreach Type in={ ".pem"; ".p12" } do={
:local CertFileName ([ $UrlEncode $FetchName ] . $Type);
:do { :do {
/tool/fetch check-certificate=yes-without-crl http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) \ /tool/fetch check-certificate=yes-without-crl http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) \
($CertRenewUrl . $CertFileName) dst-path=$CertFileName as-value; ($CertRenewUrl . $CertFileName) dst-path=$CertFileName as-value;
$WaitForFile $CertFileName; $WaitForFile $CertFileName;
:local DecryptionFailed true; :local DecryptionFailed true;
:foreach PassPhrase in=$CertRenewPass do={ :foreach I,PassPhrase in=$CertRenewPass do={
:local Result [ /certificate/import file-name=$CertFileName passphrase=$PassPhrase as-value ]; :do {
:if ($Result->"decryption-failures" = 0) do={ $LogPrint debug $ScriptName ("Trying " . $I . ". passphrase... ");
:set DecryptionFailed false; :local Result [ /certificate/import file-name=$CertFileName passphrase=$PassPhrase as-value ];
} :if ($Result->"decryption-failures" = 0) do={
$LogPrint debug $ScriptName ("Success!");
:set DecryptionFailed false;
}
} on-error={ }
} }
/file/remove [ find where name=$CertFileName ]; $RmFile $CertFileName;
:if ($DecryptionFailed = true) do={ :if ($DecryptionFailed = true) do={
$LogPrint warning $ScriptName ("Decryption failed for certificate file '" . $CertFileName . "'."); $LogPrint warning $ScriptName ("Decryption failed for certificate file '" . $CertFileName . "'.");
@ -76,13 +82,13 @@
$CertificateNameByCN [ /certificate/get $CertInChain common-name ]; $CertificateNameByCN [ /certificate/get $CertInChain common-name ];
} }
:set Return true; :return true;
} on-error={ } on-error={
$LogPrint debug $ScriptName ("Could not download certificate file '" . $CertFileName . "'."); $LogPrint debug $ScriptName ("Could not download certificate file '" . $CertFileName . "'.");
} }
} }
:return $Return; :return false;
} }
:local FormatInfo do={ :local FormatInfo do={
@ -100,7 +106,6 @@
:local FormatCertChain do={ :local FormatCertChain do={
:local Cert $1; :local Cert $1;
:global EitherOr;
:global ParseKeyValueStore; :global ParseKeyValueStore;
:local CertVal [ /certificate/get $Cert ]; :local CertVal [ /certificate/get $Cert ];
@ -111,9 +116,18 @@
:local Return ""; :local Return "";
:for I from=0 to=5 do={ :for I from=0 to=5 do={
:set Return ($Return . [ $EitherOr ([ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN") \ :set Return ($Return . [ $ParseKeyValueStore ($CertVal->"issuer") ]->"CN");
([ $ParseKeyValueStore (($CertVal->"issuer")->0) ]->"CN") ]); :local CertSettings [ /certificate/settings/get ];
:set CertVal [ /certificate/get [ find where skid=($CertVal->"akid") ] ]; :if (([ :len ($CertSettings->"builtin-trust-anchors") ] > 0 || \
[ :len ($CertSettings->"builtin-trust-store") ] > 0) && \
[[ :parse (":return [ :len [ /certificate/builtin/find where skid=\"" . ($CertVal->"akid") . "\" ] ]") ]] > 0) do={
:return $Return;
}
:do {
:set CertVal [ /certificate/get [ find where skid=($CertVal->"akid") ] ];
} on-error={
:return ($Return . " (possibly incomplete!)");
}
:if (($CertVal->"akid") = "" || ($CertVal->"akid") = ($CertVal->"skid")) do={ :if (($CertVal->"akid") = "" || ($CertVal->"akid") = ($CertVal->"skid")) do={
:return $Return; :return $Return;
} }
@ -183,7 +197,7 @@
fingerprint!=[ :tostr ($CertVal->"fingerprint") ] expires-after>$CertRenewTime ]; fingerprint!=[ :tostr ($CertVal->"fingerprint") ] expires-after>$CertRenewTime ];
:local CertNewVal [ /certificate/get $CertNew ]; :local CertNewVal [ /certificate/get $CertNew ];
:if ([ $CertificateAvailable ([ $ParseKeyValueStore ($CertNewVal->"issuer") ]->"CN") ] = false) do={ :if ([ $CertificateAvailable ([ $ParseKeyValueStore ($CertNewVal->"issuer") ]->"CN") "fetch" ] = false) do={
$LogPrint warning $ScriptName ("The certificate chain is not available!"); $LogPrint warning $ScriptName ("The certificate chain is not available!");
} }
@ -225,12 +239,12 @@
:local State [ $IfThenElse (($CertVal->"expired") = true) "expired" "is about to expire" ]; :local State [ $IfThenElse (($CertVal->"expired") = true) "expired" "is about to expire" ];
$SendNotification2 ({ origin=$ScriptName; \ $SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "warning-sign" ] . "Certificate warning: " . ($CertVal->"name")); \ subject=([ $SymbolForNotification "lock-with-ink-pen,warning-sign" ] . "Certificate warning: " . ($CertVal->"name")); \
message=("A certificate on " . $Identity . " " . $State . ".\n\n" . [ $FormatInfo $Cert ]) }); message=("A certificate on " . $Identity . " " . $State . ".\n\n" . [ $FormatInfo $Cert ]) });
$LogPrint info $ScriptName ("The certificate '" . ($CertVal->"name") . "' " . $State . \ $LogPrint info $ScriptName ("The certificate '" . ($CertVal->"name") . "' " . $State . \
", it is invalid after " . ($CertVal->"invalid-after") . "."); ", it is invalid after " . ($CertVal->"invalid-after") . ".");
} }
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,9 +1,9 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: check-health.d/state # RouterOS script: check-health.d/state
# Copyright (c) 2019-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2019-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# check for RouterOS health state - state plugin # check for RouterOS health state - state plugin
# https://rsc.eworm.de/doc/check-health.md # https://rsc.eworm.de/doc/check-health.md
@ -11,7 +11,8 @@
:global CheckHealthPlugins; :global CheckHealthPlugins;
:set ($CheckHealthPlugins->[ :jobname ]) do={ :set ($CheckHealthPlugins->[ :jobname ]) do={
:local FuncName [ :tostr $0 ]; :local FuncName [ :tostr $0 ];
:local ScriptName [ :tostr $1 ];
:global CheckHealthLast; :global CheckHealthLast;
:global Identity; :global Identity;
@ -32,13 +33,13 @@
:if ([ :typeof ($CheckHealthLast->$Name) ] != "nothing") do={ :if ([ :typeof ($CheckHealthLast->$Name) ] != "nothing") do={
:if ($CheckHealthLast->$Name = "ok" && \ :if ($CheckHealthLast->$Name = "ok" && \
$Value != "ok") do={ $Value != "ok") do={
$SendNotification2 ({ origin=$FuncName; \ $SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "cross-mark" ] . "Health warning: " . $Name); \ subject=([ $SymbolForNotification "cross-mark" ] . "Health warning: " . $Name); \
message=("The device '" . $Name . "' on " . $Identity . " failed!") }); message=("The device '" . $Name . "' on " . $Identity . " failed!") });
} }
:if ($CheckHealthLast->$Name != "ok" && \ :if ($CheckHealthLast->$Name != "ok" && \
$Value = "ok") do={ $Value = "ok") do={
$SendNotification2 ({ origin=$FuncName; \ $SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "white-heavy-check-mark" ] . "Health recovery: " . $Name); \ subject=([ $SymbolForNotification "white-heavy-check-mark" ] . "Health recovery: " . $Name); \
message=("The device '" . $Name . "' on " . $Identity . " recovered!") }); message=("The device '" . $Name . "' on " . $Identity . " recovered!") });
} }

View file

@ -1,9 +1,9 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: check-health.d/temperature # RouterOS script: check-health.d/temperature
# Copyright (c) 2019-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2019-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# check for RouterOS health state - temperature plugin # check for RouterOS health state - temperature plugin
# https://rsc.eworm.de/doc/check-health.md # https://rsc.eworm.de/doc/check-health.md
@ -11,7 +11,8 @@
:global CheckHealthPlugins; :global CheckHealthPlugins;
:set ($CheckHealthPlugins->[ :jobname ]) do={ :set ($CheckHealthPlugins->[ :jobname ]) do={
:local FuncName [ :tostr $0 ]; :local FuncName [ :tostr $0 ];
:local ScriptName [ :tostr $1 ];
:global CheckHealthLast; :global CheckHealthLast;
:global CheckHealthTemperature; :global CheckHealthTemperature;
@ -54,7 +55,7 @@
} }
:if ($Value > $CheckHealthTemperature->$Name && \ :if ($Value > $CheckHealthTemperature->$Name && \
$CheckHealthTemperatureNotified->$Name != true) do={ $CheckHealthTemperatureNotified->$Name != true) do={
$SendNotification2 ({ origin=$FuncName; \ $SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "fire" ] . "Health warning: " . $Name); \ subject=([ $SymbolForNotification "fire" ] . "Health warning: " . $Name); \
message=("The " . $Name . " on " . $Identity . " is above threshold: " . \ message=("The " . $Name . " on " . $Identity . " is above threshold: " . \
$Value . "\C2\B0" . "C") }); $Value . "\C2\B0" . "C") });
@ -62,7 +63,7 @@
} }
:if ($Value <= ($CheckHealthTemperature->$Name - $CheckHealthTemperatureDeviation) && \ :if ($Value <= ($CheckHealthTemperature->$Name - $CheckHealthTemperatureDeviation) && \
$CheckHealthTemperatureNotified->$Name = true) do={ $CheckHealthTemperatureNotified->$Name = true) do={
$SendNotification2 ({ origin=$FuncName; \ $SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "white-heavy-check-mark" ] . "Health recovery: " . $Name); \ subject=([ $SymbolForNotification "white-heavy-check-mark" ] . "Health recovery: " . $Name); \
message=("The " . $Name . " on " . $Identity . " dropped below threshold: " . \ message=("The " . $Name . " on " . $Identity . " dropped below threshold: " . \
$Value . "\C2\B0" . "C") }); $Value . "\C2\B0" . "C") });

View file

@ -1,9 +1,9 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: check-health.d/voltage # RouterOS script: check-health.d/voltage
# Copyright (c) 2019-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2019-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# check for RouterOS health state - voltage plugin # check for RouterOS health state - voltage plugin
# https://rsc.eworm.de/doc/check-health.md # https://rsc.eworm.de/doc/check-health.md
@ -11,7 +11,8 @@
:global CheckHealthPlugins; :global CheckHealthPlugins;
:set ($CheckHealthPlugins->[ :jobname ]) do={ :set ($CheckHealthPlugins->[ :jobname ]) do={
:local FuncName [ :tostr $0 ]; :local FuncName [ :tostr $0 ];
:local ScriptName [ :tostr $1 ];
:global CheckHealthLast; :global CheckHealthLast;
:global CheckHealthVoltageLow; :global CheckHealthVoltageLow;
@ -39,7 +40,7 @@
:if ($NumLast * (100 + $CheckHealthVoltagePercent) < $NumCurr * 100 || \ :if ($NumLast * (100 + $CheckHealthVoltagePercent) < $NumCurr * 100 || \
$NumLast * 100 > $NumCurr * (100 + $CheckHealthVoltagePercent)) do={ $NumLast * 100 > $NumCurr * (100 + $CheckHealthVoltagePercent)) do={
$SendNotification2 ({ origin=$FuncName; \ $SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification ("high-voltage-sign,chart-" . [ $IfThenElse ($NumLast < \ subject=([ $SymbolForNotification ("high-voltage-sign,chart-" . [ $IfThenElse ($NumLast < \
$NumCurr) "in" "de" ] . "creasing") ] . "Health warning: " . $Name); \ $NumCurr) "in" "de" ] . "creasing") ] . "Health warning: " . $Name); \
message=("The " . $Name . " on " . $Identity . " jumped more than " . $CheckHealthVoltagePercent . "%.\n\n" . \ message=("The " . $Name . " on " . $Identity . " jumped more than " . $CheckHealthVoltagePercent . "%.\n\n" . \
@ -47,12 +48,12 @@
[ $FormatLine "new value" ($Value . " V") 12 ]) }); [ $FormatLine "new value" ($Value . " V") 12 ]) });
} else={ } else={
:if ($NumCurr <= $CheckHealthVoltageLow && $NumLast > $CheckHealthVoltageLow) do={ :if ($NumCurr <= $CheckHealthVoltageLow && $NumLast > $CheckHealthVoltageLow) do={
$SendNotification2 ({ origin=$FuncName; \ $SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "high-voltage-sign,chart-decreasing" ] . "Health warning: Low " . $Name); \ subject=([ $SymbolForNotification "high-voltage-sign,chart-decreasing" ] . "Health warning: Low " . $Name); \
message=("The " . $Name . " on " . $Identity . " dropped to " . $Value . " V below hard limit.") }); message=("The " . $Name . " on " . $Identity . " dropped to " . $Value . " V below hard limit.") });
} }
:if ($NumCurr > $CheckHealthVoltageLow && $NumLast <= $CheckHealthVoltageLow) do={ :if ($NumCurr > $CheckHealthVoltageLow && $NumLast <= $CheckHealthVoltageLow) do={
$SendNotification2 ({ origin=$FuncName; \ $SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "high-voltage-sign,chart-increasing" ] . "Health recovery: Low " . $Name); \ subject=([ $SymbolForNotification "high-voltage-sign,chart-increasing" ] . "Health recovery: Low " . $Name); \
message=("The " . $Name . " on " . $Identity . " recovered to " . $Value . " V above hard limit.") }); message=("The " . $Name . " on " . $Identity . " recovered to " . $Value . " V above hard limit.") });
} }

View file

@ -1,18 +1,18 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: check-health # RouterOS script: check-health
# Copyright (c) 2019-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2019-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# check for RouterOS health state # check for RouterOS health state
# https://rsc.eworm.de/doc/check-health.md # https://rsc.eworm.de/doc/check-health.md
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global CheckHealthCPUUtilization; :global CheckHealthCPUUtilization;
@ -74,7 +74,7 @@
:set CheckHealthRAMUtilizationNotified false; :set CheckHealthRAMUtilizationNotified false;
} }
:local Plugins [ /system/script/find where name~"^check-health.d/." ]; :local Plugins [ /system/script/find where name~"^check-health\\.d/." ];
:if ([ :len $Plugins ] = 0) do={ :if ([ :len $Plugins ] = 0) do={
$LogPrint debug $ScriptName ("No plugins installed."); $LogPrint debug $ScriptName ("No plugins installed.");
:set ExitOK true; :set ExitOK true;
@ -89,22 +89,22 @@
:foreach Plugin in=$Plugins do={ :foreach Plugin in=$Plugins do={
:local PluginVal [ /system/script/get $Plugin ]; :local PluginVal [ /system/script/get $Plugin ];
:if ([ $ValidateSyntax ($PluginVal->"source") ] = true) do={ :if ([ $ValidateSyntax ($PluginVal->"source") ] = true) do={
:do { :onerror Err {
/system/script/run $Plugin; /system/script/run $Plugin;
} on-error={ } do={
$LogPrint error $ScriptName ("Plugin '" . $ScriptVal->"name" . "' failed to run."); $LogPrint error $ScriptName ("Plugin '" . $PluginVal->"name" . "' failed to run: " . $Err);
} }
} else={ } else={
$LogPrint error $ScriptName ("Plugin '" . $ScriptVal->"name" . "' failed syntax validation, skipping."); $LogPrint error $ScriptName ("Plugin '" . $PluginVal->"name" . "' failed syntax validation, skipping.");
} }
} }
:foreach PluginName,Discard in=$CheckHealthPlugins do={ :foreach PluginName,Discard in=$CheckHealthPlugins do={
($CheckHealthPlugins->$PluginName) \ ($CheckHealthPlugins->$PluginName) \
("\$CheckHealthPlugins->\"" . $PluginName . "\""); ("\$CheckHealthPlugins->\"" . $PluginName . "\"") $ScriptName;
} }
:set CheckHealthPlugins; :set CheckHealthPlugins;
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,18 +1,18 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: check-lte-firmware-upgrade # RouterOS script: check-lte-firmware-upgrade
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2018-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# check for LTE firmware upgrade, send notification # check for LTE firmware upgrade, send notification
# https://rsc.eworm.de/doc/check-lte-firmware-upgrade.md # https://rsc.eworm.de/doc/check-lte-firmware-upgrade.md
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global SentLteFirmwareUpgradeNotification; :global SentLteFirmwareUpgradeNotification;
@ -45,12 +45,12 @@
:local IntName [ /interface/lte/get $Interface name ]; :local IntName [ /interface/lte/get $Interface name ];
:local Firmware; :local Firmware;
:local Info; :local Info;
:do { :onerror Err {
:set Firmware [ /interface/lte/firmware-upgrade $Interface as-value ]; :set Firmware [ /interface/lte/firmware-upgrade $Interface as-value ];
:set Info [ /interface/lte/monitor $Interface once as-value ]; :set Info [ /interface/lte/monitor $Interface once as-value ];
} on-error={ } do={
$LogPrint debug $ScriptName ("Could not get latest LTE firmware version for interface " . \ $LogPrint debug $ScriptName ("Could not get latest LTE firmware version for interface " . \
$IntName . "."); $IntName . ": " . $Err);
:return false; :return false;
} }
@ -102,6 +102,6 @@
:foreach Interface in=[ /interface/lte/find ] do={ :foreach Interface in=[ /interface/lte/find ] do={
$CheckInterface $ScriptName $Interface; $CheckInterface $ScriptName $Interface;
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -0,0 +1,78 @@
#!rsc by RouterOS
# RouterOS script: check-perpetual-license
# Copyright (c) 2025-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md
#
# requires RouterOS, version=7.17
#
# check perpetual license on CHR
# https://rsc.eworm.de/doc/check-perpetual-license.md
:local ExitOK false;
:onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ];
:global Identity;
:global SentCertificateNotification;
:global LogPrint;
:global ScriptLock;
:global SendNotification2;
:global SymbolForNotification;
:global WaitFullyConnected;
:if ([ $ScriptLock $ScriptName ] = false) do={
:set ExitOK true;
:error false;
}
$WaitFullyConnected;
:local License [ /system/license/get ];
:if ([ :typeof ($License->"deadline-at") ] != "str") do={
$LogPrint info $ScriptName ("This device does not have a perpetual license.");
:set ExitOK true;
:error true;
}
:if ([ :len ($License->"next-renewal-at") ] = 0 && ($License->"limited-upgrades") = true) do={
$LogPrint warning $ScriptName ("Your license expired on " . ($License->"deadline-at") . "!");
:if ($SentCertificateNotification != "expired") do={
$SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "scroll,cross-mark" ] . "License expired!"); \
message=("Your license expired on " . ($License->"deadline-at") . \
", can no longer update RouterOS on " . $Identity . "...") });
:set SentCertificateNotification "expired";
}
:set ExitOK true;
:error true;
}
:if ([ :totime ($License->"deadline-at") ] - 3w < [ :timestamp ]) do={
$LogPrint warning $ScriptName ("Your license will expire on " . ($License->"deadline-at") . "!");
:if ($SentCertificateNotification != "warning") do={
$SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "scroll,warning-sign" ] . "License about to expire!"); \
message=("Your license failed to renew and is about to expire on " . \
($License->"deadline-at") . " on " . $Identity . "...") });
:set SentCertificateNotification "warning";
}
:set ExitOK true;
:error true;
}
:if ([ :typeof $SentCertificateNotification ] = "str" && \
[ :totime ($License->"deadline-at") ] - 4w > [ :timestamp ]) do={
$LogPrint info $ScriptName ("Your license was successfully renewed.");
$SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "scroll,white-heavy-check-mark" ] . "License renewed"); \
message=("Your license was successfully renewed on " . $Identity . \
". It is now valid until " . ($License->"deadline-at") . ".") });
:set SentCertificateNotification;
}
} do={
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
}

View file

@ -1,19 +1,19 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: check-routeros-update # RouterOS script: check-routeros-update
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# requires device-mode, fetch, scheduler # requires device-mode, fetch, scheduler
# #
# check for RouterOS update, send notification and/or install # check for RouterOS update, send notification and/or install
# https://rsc.eworm.de/doc/check-routeros-update.md # https://rsc.eworm.de/doc/check-routeros-update.md
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global Identity; :global Identity;
@ -28,6 +28,7 @@
:global EscapeForRegEx; :global EscapeForRegEx;
:global FetchUserAgentStr; :global FetchUserAgentStr;
:global LogPrint; :global LogPrint;
:global RebootForUpdate;
:global ScriptFromTerminal; :global ScriptFromTerminal;
:global ScriptLock; :global ScriptLock;
:global SendNotification2; :global SendNotification2;
@ -38,14 +39,11 @@
:local DoUpdate do={ :local DoUpdate do={
:local ScriptName [ :tostr $1 ]; :local ScriptName [ :tostr $1 ];
:global LogPrint;
:if ([ :len [ /system/script/find where name="packages-update" ] ] > 0) do={ :if ([ :len [ /system/script/find where name="packages-update" ] ] > 0) do={
/system/script/run packages-update; /system/script/run packages-update;
} else={ } else={
/system/package/update/install without-paging; /system/package/update/install without-paging;
} }
$LogPrint info $ScriptName ("Waiting for system to reboot.");
} }
:if ([ $ScriptLock $ScriptName ] = false) do={ :if ([ $ScriptLock $ScriptName ] = false) do={
@ -62,8 +60,14 @@
$WaitFullyConnected; $WaitFullyConnected;
:if ([ :len [ /system/scheduler/find where name="_RebootForUpdate" ] ] > 0) do={ :if ([ :len [ /system/scheduler/find where name="_RebootForUpdate" ] ] > 0) do={
:set ExitOK true; :if ([ :typeof $RebootForUpdate ] = "nothing") do={
:error "A reboot for update is already scheduled."; $LogPrint info $ScriptName ("Found a stale scheduler for reboot, removing.");
/system/scheduler/remove "_RebootForUpdate";
} else={
$LogPrint info $ScriptName ("A reboot for update is already scheduled.");
:set ExitOK true;
:error false;
}
} }
$LogPrint debug $ScriptName ("Checking for updates..."); $LogPrint debug $ScriptName ("Checking for updates...");
@ -140,13 +144,13 @@
:if ([ :len $SafeUpdateUrl ] > 0) do={ :if ([ :len $SafeUpdateUrl ] > 0) do={
:local Result; :local Result;
:do { :onerror Err {
:set Result [ /tool/fetch check-certificate=yes-without-crl \ :set Result [ /tool/fetch check-certificate=yes-without-crl \
($SafeUpdateUrl . $Update->"channel" . "?installed=" . $Update->"installed-version" . \ ($SafeUpdateUrl . $Update->"channel" . "?installed=" . $Update->"installed-version" . \
"&latest=" . $Update->"latest-version") http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) \ "&latest=" . $Update->"latest-version") http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) \
output=user as-value ]; output=user as-value ];
} on-error={ } do={
$LogPrint warning $ScriptName ("Failed receiving safe version for " . $Update->"channel" . "."); $LogPrint warning $ScriptName ("Failed receiving safe version for " . $Update->"channel" . ": " . $Err);
} }
:if ($Result->"status" = "finished" && $Result->"data" = $Update->"latest-version") do={ :if ($Result->"status" = "finished" && $Result->"data" = $Update->"latest-version") do={
$LogPrint info $ScriptName ("Version " . $Update->"latest-version" . " is considered safe, updating..."); $LogPrint info $ScriptName ("Version " . $Update->"latest-version" . " is considered safe, updating...");
@ -213,6 +217,6 @@
" is available for downgrade."); " is available for downgrade.");
:set SentRouterosUpdateNotification ($Update->"latest-version"); :set SentRouterosUpdateNotification ($Update->"latest-version");
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,21 +1,21 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: collect-wireless-mac.capsman # RouterOS script: collect-wireless-mac.capsman
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# provides: lease-script, order=40 # provides: lease-script, order=40
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# collect wireless mac adresses in access list # collect wireless mac adresses in access list
# https://rsc.eworm.de/doc/collect-wireless-mac.md # https://rsc.eworm.de/doc/collect-wireless-mac.md
# #
# !! Do not edit this file, it is generated from template! # !! Do not edit this file, it is generated from template!
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global Identity; :global Identity;
@ -95,6 +95,6 @@
$LogPrint debug $ScriptName ("No mac address available... Ignoring."); $LogPrint debug $ScriptName ("No mac address available... Ignoring.");
} }
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,21 +1,21 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: collect-wireless-mac.local # RouterOS script: collect-wireless-mac.local
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# provides: lease-script, order=40 # provides: lease-script, order=40
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# collect wireless mac adresses in access list # collect wireless mac adresses in access list
# https://rsc.eworm.de/doc/collect-wireless-mac.md # https://rsc.eworm.de/doc/collect-wireless-mac.md
# #
# !! Do not edit this file, it is generated from template! # !! Do not edit this file, it is generated from template!
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global Identity; :global Identity;
@ -96,6 +96,6 @@
$LogPrint debug $ScriptName ("No mac address available... Ignoring."); $LogPrint debug $ScriptName ("No mac address available... Ignoring.");
} }
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,10 +1,10 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: collect-wireless-mac%TEMPL% # RouterOS script: collect-wireless-mac%TEMPL%
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# provides: lease-script, order=40 # provides: lease-script, order=40
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# collect wireless mac adresses in access list # collect wireless mac adresses in access list
# https://rsc.eworm.de/doc/collect-wireless-mac.md # https://rsc.eworm.de/doc/collect-wireless-mac.md
@ -12,11 +12,11 @@
# !! This is just a template to generate the real script! # !! This is just a template to generate the real script!
# !! Pattern '%TEMPL%' is replaced, paths are filtered. # !! Pattern '%TEMPL%' is replaced, paths are filtered.
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global Identity; :global Identity;
@ -113,6 +113,6 @@
$LogPrint debug $ScriptName ("No mac address available... Ignoring."); $LogPrint debug $ScriptName ("No mac address available... Ignoring.");
} }
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,21 +1,21 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: collect-wireless-mac.wifi # RouterOS script: collect-wireless-mac.wifi
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# provides: lease-script, order=40 # provides: lease-script, order=40
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# collect wireless mac adresses in access list # collect wireless mac adresses in access list
# https://rsc.eworm.de/doc/collect-wireless-mac.md # https://rsc.eworm.de/doc/collect-wireless-mac.md
# #
# !! Do not edit this file, it is generated from template! # !! Do not edit this file, it is generated from template!
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global Identity; :global Identity;
@ -95,6 +95,6 @@
$LogPrint debug $ScriptName ("No mac address available... Ignoring."); $LogPrint debug $ScriptName ("No mac address available... Ignoring.");
} }
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

17
contrib/Makefile Normal file
View file

@ -0,0 +1,17 @@
# Makefile
HTML := $(shell grep -xl '<!-- static html //-->' *.html)
.PHONY: all docs clean
all: docs
badges.html: badges.md
markdown $< > $@
docs: static-html.sh $(HTML) badges.html
./static-html.sh $(HTML)
clean:
rm -f badges.html
git checkout HEAD -- $(HTML)

6
contrib/badges.md Normal file
View file

@ -0,0 +1,6 @@
[![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.17-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)

9
contrib/checksums.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
# generate a checksums file as used by $ScriptInstallUpdate
set -e
md5sum $(find -name '*.rsc' | sort) | \
sed -e "s| \./||" -e 's|.rsc$||' | \
jq --raw-input --null-input '[ inputs | split (" ") | { (.[1]): (.[0]) }] | add'

6
contrib/commitinfo.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh
sed \
-e "/^:global CommitId/c :global CommitId \"${COMMITID:-unknown}\";" \
-e "/^:global CommitInfo/c :global CommitInfo \"${COMMITINFO:-unknown}\";" \
< "${1}"

23
contrib/html.sh Executable file
View file

@ -0,0 +1,23 @@
#!/bin/sh
set -e
RELTO="$(dirname "${1}")"
sed \
-e "s|__TITLE__|$(head -n1 "${1}")|" \
-e "s|__GENERAL__|$(realpath --relative-to="${RELTO}" general/)|" \
-e "s|__ROOT__|$(realpath --relative-to="${RELTO}" ./)|" \
< "${0}.d/head.html"
markdown -f toc,idanchor "${1}" | sed \
-e 's/href="\([-_\./[:alnum:]]*\)\.md\(#[-[:alnum:]]*\)\?"/href="\1.html\2"/g' \
-e '/<h[1234] /s| id="\(.*\)">| id="\L\1">|' \
-e '/<h[1234] /s|-2[1789cd]-||g' -e '/<h[1234] /s|--26-amp-3b-||g' \
-e '/^<pre>/s|pre|pre class="code" onclick="CopyToClipboard(this)"|g' \
-e '/The above link may be broken on code hosting sites/s|blockquote|blockquote style="display: none;"|'
sed \
-e "s|__DATE__|${DATE:-$(date --rfc-email)}|" \
-e "s|__VERSION__|${VERSION:-unknown}|" \
< "${0}.d/foot.html"

View file

@ -0,0 +1,5 @@
<p class="foot">RouterOS Scripts documentation generated on <i>__DATE__</i> for <i>__VERSION__</i><br />
Copyright &copy; 2013-2026 Christian Hesse &lt;mail@eworm.de&gt;</p>
</body></html>

View file

@ -0,0 +1,16 @@
<!DOCTYPE html><html lang="en">
<head><meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>RouterOS Scripts :: __TITLE__</title>
<link rel="stylesheet" type="text/css" href="__GENERAL__/style.css">
<link rel="icon" type="image/png" href="__ROOT__/logo.png">
<script type="text/javascript" src="__GENERAL__/clipboard.js"></script>
</head><body>
<table><tr>
<td><img src="__GENERAL__/eworm-meadow.avif" alt="eworm on meadow" /></td>
<td><img src="__GENERAL__/qr-code.png" alt="QR code: rsc.eworm.de" /></td>
<td class="head"><span class="top">RouterOS Scripts</span><br />
<span class="bottom">a collection of scripts for MikroTik RouterOS</span></td>
</tr></table>
<hr />

View file

@ -1,5 +0,0 @@
body {
font-family: fira-sans, sans-serif;
font-size: 10pt;
background-color: transparent;
}

View file

@ -1,14 +1,30 @@
<!DOCTYPE html> <!DOCTYPE html><html lang="en">
<html lang="en"> <!-- static html //-->
<head> <head><meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="UTF-8"> <title>RouterOS Scripts :: Logo Color Changer</title>
<title>RouterOS-Scripts Logo Color Changer</title> <link rel="stylesheet" type="text/css" href="../general/style.css">
<link rel="stylesheet" type="text/css" href="logo-color.d/style.css"> <link rel="icon" type="image/png" href="../logo.png">
<script src="logo-color.d/script.js"></script> <script src="logo-color.d/script.js"></script>
</head> </head><body>
<body>
<h1>RouterOS-Scripts Logo Color Changer</h1> <table><tr>
<td><img src="../general/eworm-meadow.avif" alt="eworm on meadow" /></td>
<td><img src="../general/qr-code.png" alt="QR code: rsc.eworm.de" /></td>
<td class="head"><span class="top">RouterOS Scripts</span><br />
<span class="bottom">a collection of scripts for MikroTik RouterOS</span></td>
</tr></table>
<hr />
<h1>Logo Color Changer</h1>
<!-- badges here //-->
<p><a href="../README.md">⬅️ Go back to main README</a></p>
<blockquote style="/* display */"><p>💡️ <strong>Hint</strong>: This site or links
on it may be broken on code hosting sites. Use
<a href="https://rsc.eworm.de/main/contrib/logo-color.html">Logo Color Changer</a>
instead.</p></blockquote>
<p>You want the logo for your own notifications? But you joined the <p>You want the logo for your own notifications? But you joined the
<a href="https://t.me/routeros_scripts">Telegram Group</a> and want <a href="https://t.me/routeros_scripts">Telegram Group</a> and want
@ -24,17 +40,23 @@ something that differentiates? Color it!</p>
<p>Then right-click, click "<i>Take Screenshot</i>" and finally select the <p>Then right-click, click "<i>Take Screenshot</i>" and finally select the
logo and download it.</p> logo and download it.</p>
<p><img src="logo-color.d/browser-01.avif" width=533 height=482 alt="Screenshot Browser 01"> <p><img src="logo-color.d/browser-01.avif" alt="Screenshot Browser 01"></p>
<img src="logo-color.d/browser-02.avif" width=533 height=482 alt="Screenshot Browser 02"> <p><img src="logo-color.d/browser-02.avif" alt="Screenshot Browser 02"></p>
<img src="logo-color.d/browser-03.avif" width=533 height=482 alt="Screenshot Browser 03"></p> <p><img src="logo-color.d/browser-03.avif" alt="Screenshot Browser 03"></p>
<p>(This example is with <p>(This example is with
<a href="https://www.mozilla.org/de/firefox/new/">Firefox</a>. The workflow <a href="https://www.mozilla.org/de/firefox/new/">Firefox</a>. The workflow
for other browsers may differ.)</p> for other browsers may differ.)</p>
<p>See how to <p>See how to
<a href="../../about/doc/mod/notification-telegram.md#set-a-profile-photo">Set <a href="../doc/mod/notification-telegram.md#set-a-profile-photo">Set
a profile photo</a> for your Telegram bot.</p> a profile photo</a> for your Telegram bot.</p>
</body> <hr />
</html>
<p><a href="../README.md">⬅️ Go back to main README</a><br/>
<a href="#top">⬆️ Go back to top</a></p>
<p class="foot">Copyright &copy; 2013-2026 Christian Hesse &lt;mail@eworm.de&gt;</p>
</body></html>

View file

@ -1,36 +0,0 @@
body {
font-family: fira-sans, sans-serif;
font-size: 10pt;
background-color: transparent;
}
div.notification {
position: relative;
float: right;
width: 600px;
border: 3px outset #6c5d53;
/* border-radius: 5px; */
padding: 10px;
background-color: #e6e6e6;
}
div.content {
padding-left: 60px;
}
img.logo {
float: left;
border-radius: 50%;
}
p.heading {
margin: 0px;
font-weight: bold;
text-decoration: underline;
}
p.hint {
display: none;
}
pre {
font-family: fira-mono, monospace;
white-space: pre-wrap;
}
span.link {
color: #863600;
}

View file

@ -1,35 +1,57 @@
<!DOCTYPE html> <!DOCTYPE html><html lang="en">
<html lang="en"> <!-- static html //-->
<head> <head><meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="UTF-8"> <title>RouterOS Scripts :: Notification Generator</title>
<title>RouterOS-Scripts Notification Generator</title> <link rel="stylesheet" type="text/css" href="../general/style.css">
<link rel="stylesheet" type="text/css" href="notification.d/style.css"> <link rel="icon" type="image/png" href="../logo.png">
<script src="notification.d/script.js"></script> <script src="notification.d/script.js"></script>
</head> </head><body>
<body>
<h1>RouterOS-Scripts Notification Generator</h1> <table><tr>
<td><img src="../general/eworm-meadow.avif" alt="eworm on meadow" /></td>
<td><img src="../general/qr-code.png" alt="QR code: rsc.eworm.de" /></td>
<td class="head"><span class="top">RouterOS Scripts</span><br />
<span class="bottom">a collection of scripts for MikroTik RouterOS</span></td>
</tr></table>
<hr />
<h1>Notification Generator</h1>
<!-- badges here //-->
<p><a href="../README.md">⬅️ Go back to main README</a></p>
<blockquote style="/* display */"><p>💡️ <strong>Hint</strong>: This site or links
on it may be broken on code hosting sites. Use
<a href="https://rsc.eworm.de/main/contrib/notification.html">Notification Generator</a>
instead.</p></blockquote>
<div class="notification"> <div class="notification">
<img src="../logo.svg" alt="logo" class="logo" width=48 height=48> <img src="../logo.svg" alt="logo" class="logo" width=48 height=48>
<div class="content"> <div class="content">
<p id="heading" class="heading">[<span id="hostname">MikroTik</span>] <span id="subject"> Subject</span></p> <p id="heading" class="heading">[<span id="hostname">MikroTik</span>] <span id="subject"> Subject</span></p>
<pre id="message">Message</pre> <pre id="message">Message</pre>
<p id="link" class="hint">🔗 <span id="link-text" class="link">https://eworm.de/</span></p> <p id="link" class="hint">🔗 <span id="link-text" class="link">https://rsc.eworm.de/</span></p>
<p id="queued" class="hint">⏰ This message was queued since <span id="queued-since">oct/18/2022 18:30:48</span> and may be obsolete.</p> <p id="queued" class="hint">⏰ This message was queued since <i><span id="queued-since">2025-10-29 16:06:18</span></i> and may be obsolete.</p>
<p id="cut" class="hint">✂️ The message was too long and has been truncated, cut off <span id="cut-percent">13</span>%!</p> <p id="cut" class="hint">✂️ The message was too long and has been truncated, cut off <i><span id="cut-percent">13</span>%</i>!</p>
</div> </div>
</div> </div>
<p>Hostname: <input type="text" value="MikroTik" onchange="update(this, 'hostname')"></p> <p>Hostname: <input type="text" value="MikroTik" onchange="update(this, 'hostname')"></p>
<p>Subject: <input type="text" size=50 value=" Subject" onchange="update(this, 'subject')"></p> <p>Subject: <input type="text" size=50 value=" Subject" onchange="update(this, 'subject')"></p>
<p>Message: <textarea id="w3review" name="w3review" rows="4" cols="50" onchange="update(this, 'message')">Message</textarea></p> <p>Message: <textarea id="w3review" name="w3review" rows="4" cols="50" onchange="update(this, 'message')">Message</textarea></p>
<p><input type="checkbox" onclick="visible(this, 'link')"> Show link: <input type="text" value="https://eworm.de/" onchange="update(this, 'link-text')"></p> <p><input type="checkbox" onclick="visible(this, 'link')"> Show link: <input type="text" value="https://rsc.eworm.de/" onchange="update(this, 'link-text')"></p>
<p><input type="checkbox" onclick="visible(this, 'queued')"> Queued since <input type="text" value="oct/18/2022 18:30:48" onchange="update(this, 'queued-since')"></p> <p><input type="checkbox" onclick="visible(this, 'queued')"> Queued since <input type="text" value="2025-10-29 16:06:18" onchange="update(this, 'queued-since')"></p>
<p><input type="checkbox" onclick="visible(this, 'cut')"> Cut-off with <input type="number" min=1 max=99 value=13 onchange="update(this, 'cut-percent')"> percent</p> <p><input type="checkbox" onclick="visible(this, 'cut')"> Cut-off with <input type="number" min=1 max=99 value=13 onchange="update(this, 'cut-percent')"> percent</p>
<p>Then right-click, click "<i>Take Screenshot</i>" and finally select the <p>Then right-click, click "<i>Take Screenshot</i>" and finally select the
notification and download it.</p> notification and download it.</p>
</body> <hr />
</html>
<p><a href="../README.md">⬅️ Go back to main README</a><br/>
<a href="#top">⬆️ Go back to top</a></p>
<p class="foot">Copyright &copy; 2013-2026 Christian Hesse &lt;mail@eworm.de&gt;</p>
</body></html>

10
contrib/static-html.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
set -e
sed -i \
-e '/href=/s|\.md|\.html|' \
-e '/blockquote/s|/\* display \*/|display: none;|' \
-e '/<!-- badges here \/\/-->/r badges.html' \
-e '/<!-- badges here \/\/-->/d' \
"${@}"

274
contrib/telegram.md Normal file
View file

@ -0,0 +1,274 @@
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.17-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)
We have [Miss Rose Bot ↗️](https://t.me/MissRose_bot) in our
[RouterOS-Scripts ↗️](https://t.me/routeros_scripts) Telegram group,
always kind and ready to help moderate.
Notes
-----
### README
/save readme Please read the [main README](https://rsc.eworm.de/) to understand how things work and to get the base installation right.
### Available scripts
#### accesslist-duplicates
/save accesslist-duplicates Find and remove access list duplicates with [accesslist-duplicates](https://rsc.eworm.de/doc/accesslist-duplicates.md).
#### backup-cloud
/save backup-cloud Upload backup to Mikrotik cloud with [backup-cloud](https://rsc.eworm.de/doc/backup-cloud.md).
#### backup-email
/save backup-email Send backup via e-mail with [backup-email](https://rsc.eworm.de/doc/backup-email.md).
#### backup-partition
/save backup-partition Save configuration to fallback partition with [backup-partition](https://rsc.eworm.de/doc/backup-partition.md).
#### backup-upload
/save backup-upload Upload backup to server with [backup-upload](https://rsc.eworm.de/doc/backup-upload.md).
#### capsman-download-packages
/save capsman-download-packages Download packages for CAP upgrade from CAPsMAN with [capsman-download-packages](https://rsc.eworm.de/doc/capsman-download-packages.md).
#### capsman-rolling-upgrade
/save capsman-rolling-upgrade Run rolling CAP upgrades from CAPsMAN with [capsman-rolling-upgrade](https://rsc.eworm.de/doc/capsman-rolling-upgrade.md).
#### certificate-renew-issued
/save certificate-renew-issued Renew locally issued certificates with [certificate-renew-issued](https://rsc.eworm.de/doc/certificate-renew-issued.md).
#### check-certificates
/save check-certificates Renew certificates and notify on expiration with [check-certificates](https://rsc.eworm.de/doc/check-certificates.md).
#### check-health
/save check-health Notify about health state with [check-health](https://rsc.eworm.de/doc/check-health.md).
#### check-lte-firmware-upgrade
/save check-lte-firmware-upgrade Notify on LTE firmware upgrade with [check-lte-firmware-upgrade](https://rsc.eworm.de/doc/check-lte-firmware-upgrade.md).
#### check-perpetual-license
/save check-perpetual-license Check perpetual license on CHR with [check-perpetual-license](https://rsc.eworm.de/doc/check-perpetual-license.md).
#### check-routeros-update
/save check-routeros-update Notify on RouterOS update with [check-routeros-update](https://rsc.eworm.de/doc/check-routeros-update.md).
#### collect-wireless-mac
/save collect-wireless-mac Collect MAC addresses in wireless access list with [collect-wireless-mac](https://rsc.eworm.de/doc/collect-wireless-mac.md).
#### daily-psk
/save daily-psk Use wireless network with [daily-psk](https://rsc.eworm.de/doc/daily-psk.md).
#### dhcp-lease-comment
/save dhcp-lease-comment Comment DHCP leases with [dhcp-lease-comment](https://rsc.eworm.de/doc/dhcp-lease-comment.md).
#### dhcp-to-dns
/save dhcp-to-dns Create DNS records for DHCP leases with [dhcp-to-dns](https://rsc.eworm.de/doc/dhcp-to-dns.md).
#### firmware-upgrade-reboot
/save firmware-upgrade-reboot Automatically upgrade firmware and reboot with [firmware-upgrade-reboot](https://rsc.eworm.de/doc/firmware-upgrade-reboot.md).
#### fw-addr-lists
/save fw-addr-lists Download, import and update firewall address-lists with [fw-addr-lists](https://rsc.eworm.de/doc/fw-addr-lists.md).
#### global-wait
/save global-wait Wait for global functions und modules with [global-wait](https://rsc.eworm.de/doc/global-wait.md).
#### gps-track
/save gps-track Send GPS position to server with [gps-track](https://rsc.eworm.de/doc/gps-track.md).
#### hotspot-to-wpa
/save hotspot-to-wpa Use WPA network with [hotspot-to-wpa](https://rsc.eworm.de/doc/hotspot-to-wpa.md).
#### ipsec-to-dns
/save ipsec-to-dns Create DNS records for IPSec peers with [ipsec-to-dns](https://rsc.eworm.de/doc/ipsec-to-dns.md).
#### ipv6-update
/save ipv6-update Update configuration on IPv6 prefix change with [ipv6-update](https://rsc.eworm.de/doc/ipv6-update.md).
#### ip-addr-bridge
/save ip-addr-bridge Manage IP addresses with [ip-addr-bridge](https://rsc.eworm.de/doc/ip-addr-bridge.md).
#### lease-script
/save lease-script Run other scripts on DHCP lease with [lease-script](https://rsc.eworm.de/doc/lease-script.md).
#### leds-mode
/save leds-mode Manage LEDs dark mode with [leds-mode](https://rsc.eworm.de/doc/leds-mode.md).
#### log-forward
/save log-forward Forward log messages via notification with [log-forward](https://rsc.eworm.de/doc/log-forward.md).
#### mode-button
/save mode-button Mode button with [mode-button](https://rsc.eworm.de/doc/mode-button.md).
#### netwatch-dns
/save netwatch-dns Manage DNS and DoH servers from netwatch with [netwatch-dns](https://rsc.eworm.de/doc/netwatch-dns.md).
#### netwatch-notify
/save netwatch-notify Notify on host up and down with [netwatch-notify](https://rsc.eworm.de/doc/netwatch-notify.md).
#### ospf-to-leds
/save ospf-to-leds Visualize OSPF state via LEDs with [ospf-to-leds](https://rsc.eworm.de/doc/ospf-to-leds.md).
#### packages-update
/save packages-update Manage system update with [packages-update](https://rsc.eworm.de/doc/packages-update.md).
#### ppp-on-up
/save ppp-on-up Run scripts on ppp connection with [ppp-on-up](https://rsc.eworm.de/doc/ppp-on-up.md).
#### sms-action
/save sms-action Act on received SMS with [sms-action](https://rsc.eworm.de/doc/sms-action.md).
#### sms-forward
/save sms-forward Forward received SMS with [sms-forward](https://rsc.eworm.de/doc/sms-forward.md).
#### super-mario-theme
/save super-mario-theme Play Super Mario theme with [super-mario-theme](https://rsc.eworm.de/doc/super-mario-theme.md).
#### telegram-chat
/save telegram-chat Chat with [telegram-chat](https://rsc.eworm.de/doc/telegram-chat.md).
#### unattended-lte-firmware-upgrade
/save unattended-lte-firmware-upgrade Install LTE firmware upgrade with [unattended-lte-firmware-upgrade](https://rsc.eworm.de/doc/unattended-lte-firmware-upgrade.md).
#### update-gre-address
/save update-gre-address Update GRE configuration with [update-gre-address](https://rsc.eworm.de/doc/update-gre-address.md).
#### update-tunnelbroker
/save update-tunnelbroker Update tunnelbroker configuration with [update-tunnelbroker](https://rsc.eworm.de/doc/update-tunnelbroker.md).
### Available modules
#### mod/bridge-port-to
/save mod/bridge-port-to Manage ports in bridge with [mod/bridge-port-to](https://rsc.eworm.de/doc/mod/bridge-port-to.md).
#### mod/bridge-port-vlan
/save mod/bridge-port-vlan Manage VLANs on bridge ports with [mod/bridge-port-vlan](https://rsc.eworm.de/doc/mod/bridge-port-vlan.md).
#### mod/inspectvar
/save mod/inspectvar Inspect variables with [mod/inspectvar](https://rsc.eworm.de/doc/mod/inspectvar.md).
#### mod/ipcalc
/save mod/ipcalc IP address calculation with [mod/ipcalc](https://rsc.eworm.de/doc/mod/ipcalc.md).
#### mod/notification-email
/save mod/notification-email Send notifications via e-mail with [mod/notification-email](https://rsc.eworm.de/doc/mod/notification-email.md).
#### mod/notification-gotify
/save mod/notification-gotify Send notifications via Gotify with [mod/notification-gotify](https://rsc.eworm.de/doc/mod/notification-gotify.md).
#### mod/notification-matrix
/save mod/notification-matrix Send notifications via Matrix with [mod/notification-matrix](https://rsc.eworm.de/doc/mod/notification-matrix.md).
#### mod/notification-ntfy
/save mod/notification-ntfy Send notifications via Ntfy with [mod/notification-ntfy](https://rsc.eworm.de/doc/mod/notification-ntfy.md).
#### mod/notification-telegram
/save mod/notification-telegram Send notifications via Telegram with [mod/notification-telegram](https://rsc.eworm.de/doc/mod/notification-telegram.md).
#### mod/scriptrunonce
/save mod/scriptrunonce Download script and run it once with [mod/scriptrunonce](https://rsc.eworm.de/doc/mod/scriptrunonce.md).
#### mod/ssh-keys-import
/save mod/ssh-keys-import Import ssh keys for public key authentication with [mod/ssh-keys-import](https://rsc.eworm.de/doc/mod/ssh-keys-import.md).
### Other
#### Installing from branches
/save branches Living on the edge or testing new features? Learn how to [switch specific scripts or the complete installation to different branches](https://rsc.eworm.de/BRANCHES.md).
#### Certificate name from browser
/save certificate-name-from-browser Running or accessing a custom service and looking for the CA certificate? Get the [certificate name from browser](https://rsc.eworm.de/CERTIFICATES.md).
#### Debug output and logs
/save debug Enable [debug output and logs](https://rsc.eworm.de/DEBUG.md) for more information on what happens.
#### Donate
/save donate This project is developed in private spare time and usage is free of charge for you. If you like the scripts and think this is of value for you or your business [please consider a donation](https://rsc.eworm.de/#donate). Thanks!
#### Fix existing installation
/save fix-installation [Fix existing installation] Your installation broke and you do not know back and forth? See how to [fix an existing installation](https://rsc.eworm.de/INITIAL-COMMANDS.md#fix-existing-installation).
#### Next!
/save next Another satisfied user. 😊 Next, please!
#### Off-topic
/save off-topic Please note this group is not about MikroTik RouterOS in general, but [RouterOS Scripts](https://rsc.eworm.de/). Your request is not about scripting at all, so please discuss somewhere else. See the [MikroTik RouterOS users (english)](https://t.me/RouterOS_users_english) group or official Mikrotik forums (https://forum.mikrotik.com/).
Greeting
--------
/setwelcome Hello {mention}, and welcome to {chatname}!
Please note this group is not about RouterOS in general, but [RouterOS Scripts](https://rsc.eworm.de/). Also pay attention to [rules](https://t.me/routeros_scripts/4), thanks!
---
[⬅️ Go back to main README](../README.md)
[⬆️ Go back to top](#top)

11
contrib/template-capsman.sh Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
set -e
sed \
-e '/\/interface\/wifi\//d' \
-e '/\/interface\/wireless\//d' \
-e 's|%TEMPL%|.capsman|' \
-e '/^# NOT \/caps-man\/ #$/,/^# NOT \/caps-man\/ #$/d' \
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
< "${1}"

11
contrib/template-local.sh Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
set -e
sed \
-e '/\/caps-man\//d' \
-e '/\/interface\/wifi\//d' \
-e 's|%TEMPL%|.local|' \
-e '/^# NOT \/interface\/wireless\/ #$/,/^# NOT \/interface\/wireless\/ #$/d' \
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
< "${1}"

11
contrib/template-wifi.sh Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
set -e
sed \
-e '/\/caps-man\//d' \
-e '/\/interface\/wireless\//d' \
-e 's|%TEMPL%|.wifi|' \
-e '/^# NOT \/interface\/wifi\/ #$/,/^# NOT \/interface\/wifi\/ #$/d' \
-e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \
< "${1}"

View file

@ -1,21 +1,21 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: daily-psk.capsman # RouterOS script: daily-psk.capsman
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de> # Michael Gisbers <michael@gisbers.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# requires RouterOS, version=7.15 # requires RouterOS, version=7.17
# #
# update daily PSK (pre shared key) # update daily PSK (pre shared key)
# https://rsc.eworm.de/doc/daily-psk.md # https://rsc.eworm.de/doc/daily-psk.md
# #
# !! Do not edit this file, it is generated from template! # !! Do not edit this file, it is generated from template!
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global DailyPskMatchComment; :global DailyPskMatchComment;
@ -91,6 +91,6 @@
} }
} }
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,21 +1,21 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: daily-psk.local # RouterOS script: daily-psk.local
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de> # Michael Gisbers <michael@gisbers.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# requires RouterOS, version=7.15 # requires RouterOS, version=7.17
# #
# update daily PSK (pre shared key) # update daily PSK (pre shared key)
# https://rsc.eworm.de/doc/daily-psk.md # https://rsc.eworm.de/doc/daily-psk.md
# #
# !! Do not edit this file, it is generated from template! # !! Do not edit this file, it is generated from template!
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global DailyPskMatchComment; :global DailyPskMatchComment;
@ -90,6 +90,6 @@
} }
} }
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,10 +1,10 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: daily-psk%TEMPL% # RouterOS script: daily-psk%TEMPL%
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de> # Michael Gisbers <michael@gisbers.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# requires RouterOS, version=7.15 # requires RouterOS, version=7.17
# #
# update daily PSK (pre shared key) # update daily PSK (pre shared key)
# https://rsc.eworm.de/doc/daily-psk.md # https://rsc.eworm.de/doc/daily-psk.md
@ -12,11 +12,11 @@
# !! This is just a template to generate the real script! # !! This is just a template to generate the real script!
# !! Pattern '%TEMPL%' is replaced, paths are filtered. # !! Pattern '%TEMPL%' is replaced, paths are filtered.
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global DailyPskMatchComment; :global DailyPskMatchComment;
@ -106,6 +106,6 @@
} }
} }
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,21 +1,21 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: daily-psk.wifi # RouterOS script: daily-psk.wifi
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de> # Michael Gisbers <michael@gisbers.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# requires RouterOS, version=7.15 # requires RouterOS, version=7.17
# #
# update daily PSK (pre shared key) # update daily PSK (pre shared key)
# https://rsc.eworm.de/doc/daily-psk.md # https://rsc.eworm.de/doc/daily-psk.md
# #
# !! Do not edit this file, it is generated from template! # !! Do not edit this file, it is generated from template!
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global DailyPskMatchComment; :global DailyPskMatchComment;
@ -91,6 +91,6 @@
} }
} }
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,21 +1,21 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: dhcp-lease-comment.capsman # RouterOS script: dhcp-lease-comment.capsman
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# provides: lease-script, order=60 # provides: lease-script, order=60
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# update dhcp-server lease comment with infos from access-list # update dhcp-server lease comment with infos from access-list
# https://rsc.eworm.de/doc/dhcp-lease-comment.md # https://rsc.eworm.de/doc/dhcp-lease-comment.md
# #
# !! Do not edit this file, it is generated from template! # !! Do not edit this file, it is generated from template!
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global LogPrint; :global LogPrint;
@ -38,6 +38,6 @@
/ip/dhcp-server/lease/set comment=$NewComment $Lease; /ip/dhcp-server/lease/set comment=$NewComment $Lease;
} }
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,21 +1,21 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: dhcp-lease-comment.local # RouterOS script: dhcp-lease-comment.local
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# provides: lease-script, order=60 # provides: lease-script, order=60
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# update dhcp-server lease comment with infos from access-list # update dhcp-server lease comment with infos from access-list
# https://rsc.eworm.de/doc/dhcp-lease-comment.md # https://rsc.eworm.de/doc/dhcp-lease-comment.md
# #
# !! Do not edit this file, it is generated from template! # !! Do not edit this file, it is generated from template!
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global LogPrint; :global LogPrint;
@ -38,6 +38,6 @@
/ip/dhcp-server/lease/set comment=$NewComment $Lease; /ip/dhcp-server/lease/set comment=$NewComment $Lease;
} }
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,10 +1,10 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: dhcp-lease-comment%TEMPL% # RouterOS script: dhcp-lease-comment%TEMPL%
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# provides: lease-script, order=60 # provides: lease-script, order=60
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# update dhcp-server lease comment with infos from access-list # update dhcp-server lease comment with infos from access-list
# https://rsc.eworm.de/doc/dhcp-lease-comment.md # https://rsc.eworm.de/doc/dhcp-lease-comment.md
@ -12,11 +12,11 @@
# !! This is just a template to generate the real script! # !! This is just a template to generate the real script!
# !! Pattern '%TEMPL%' is replaced, paths are filtered. # !! Pattern '%TEMPL%' is replaced, paths are filtered.
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global LogPrint; :global LogPrint;
@ -43,6 +43,6 @@
/ip/dhcp-server/lease/set comment=$NewComment $Lease; /ip/dhcp-server/lease/set comment=$NewComment $Lease;
} }
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,21 +1,21 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: dhcp-lease-comment.wifi # RouterOS script: dhcp-lease-comment.wifi
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# provides: lease-script, order=60 # provides: lease-script, order=60
# requires RouterOS, version=7.14 # requires RouterOS, version=7.17
# #
# update dhcp-server lease comment with infos from access-list # update dhcp-server lease comment with infos from access-list
# https://rsc.eworm.de/doc/dhcp-lease-comment.md # https://rsc.eworm.de/doc/dhcp-lease-comment.md
# #
# !! Do not edit this file, it is generated from template! # !! Do not edit this file, it is generated from template!
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global LogPrint; :global LogPrint;
@ -38,6 +38,6 @@
/ip/dhcp-server/lease/set comment=$NewComment $Lease; /ip/dhcp-server/lease/set comment=$NewComment $Lease;
} }
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

View file

@ -1,19 +1,19 @@
#!rsc by RouterOS #!rsc by RouterOS
# RouterOS script: dhcp-to-dns # RouterOS script: dhcp-to-dns
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de> # Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md # https://rsc.eworm.de/COPYING.md
# #
# provides: lease-script, order=20 # provides: lease-script, order=20
# requires RouterOS, version=7.16 # requires RouterOS, version=7.17
# #
# check DHCP leases and add/remove/update DNS entries # check DHCP leases and add/remove/update DNS entries
# https://rsc.eworm.de/doc/dhcp-to-dns.md # https://rsc.eworm.de/doc/dhcp-to-dns.md
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:do { :onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global Domain; :global Domain;
@ -125,6 +125,6 @@
$LogPrint debug $ScriptName ("No address available... Ignoring."); $LogPrint debug $ScriptName ("No address available... Ignoring.");
} }
} }
} on-error={ } do={
:global ExitError; $ExitError $ExitOK [ :jobname ]; :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Before After
Before After

View file

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before After
Before After

View file

@ -4,7 +4,7 @@ Upload backup to Mikrotik cloud
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.17-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
@ -17,7 +17,7 @@ Description
----------- -----------
This script uploads This script uploads
[binary backup to Mikrotik cloud](https://wiki.mikrotik.com/wiki/Manual:IP/Cloud#Backup). [binary backup to Mikrotik cloud ↗️](https://wiki.mikrotik.com/wiki/Manual:IP/Cloud#Backup).
> ⚠️ **Warning**: The used command can hit errors that a script can with > ⚠️ **Warning**: The used command can hit errors that a script can with
> workaround only. A notification *should* be sent anyway. But it can result > workaround only. A notification *should* be sent anyway. But it can result
@ -49,6 +49,7 @@ The configuration goes to `global-config-overlay`, these are the parameters:
Also notification settings are required for Also notification settings are required for
[e-mail](mod/notification-email.md), [e-mail](mod/notification-email.md),
[gotify](mod/notification-gotify.md),
[matrix](mod/notification-matrix.md), [matrix](mod/notification-matrix.md),
[ntfy](mod/notification-ntfy.md) and/or [ntfy](mod/notification-ntfy.md) and/or
[telegram](mod/notification-telegram.md). [telegram](mod/notification-telegram.md).

View file

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

View file

@ -4,7 +4,7 @@ Save configuration to fallback partition
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.17-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
@ -17,7 +17,7 @@ Description
----------- -----------
This script saves the current configuration to fallback This script saves the current configuration to fallback
[partition](https://wiki.mikrotik.com/wiki/Manual:Partitions). [partition ↗️](https://wiki.mikrotik.com/wiki/Manual:Partitions).
It can also copy-over the RouterOS installation when run interactively It can also copy-over the RouterOS installation when run interactively
or just before a feature update. or just before a feature update.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before After
Before After

View file

@ -4,7 +4,7 @@ Upload backup to server
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.17-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
@ -55,6 +55,7 @@ The configuration goes to `global-config-overlay`, these are the parameters:
Also notification settings are required for Also notification settings are required for
[e-mail](mod/notification-email.md), [e-mail](mod/notification-email.md),
[gotify](mod/notification-gotify.md),
[matrix](mod/notification-matrix.md), [matrix](mod/notification-matrix.md),
[ntfy](mod/notification-ntfy.md) and/or [ntfy](mod/notification-ntfy.md) and/or
[telegram](mod/notification-telegram.md). [telegram](mod/notification-telegram.md).

View file

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

View file

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

View file

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

View file

@ -4,7 +4,7 @@ Renew certificates and notify on expiration
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers) [![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network) [![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers) [![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/) [![required RouterOS version](https://img.shields.io/badge/RouterOS-7.17-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts) [![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J) [![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
@ -19,9 +19,10 @@ Description
This script tries to download and renew certificates, then notifies about This script tries to download and renew certificates, then notifies about
certificates that are still about to expire. certificates that are still about to expire.
### Sample notification ### Sample notifications
![check-certificates notification](check-certificates.d/notification.avif) ![check-certificates notification warning](check-certificates.d/notification-01-warn.avif)
![check-certificates notification renew](check-certificates.d/notification-02-renew.avif)
Requirements and installation Requirements and installation
----------------------------- -----------------------------
@ -51,6 +52,7 @@ subject alternative name (aka *Subject Alt Name* or *SAN*) can be used.
Also notification settings are required for Also notification settings are required for
[e-mail](mod/notification-email.md), [e-mail](mod/notification-email.md),
[gotify](mod/notification-gotify.md),
[matrix](mod/notification-matrix.md), [matrix](mod/notification-matrix.md),
[ntfy](mod/notification-ntfy.md) and/or [ntfy](mod/notification-ntfy.md) and/or
[telegram](mod/notification-telegram.md). [telegram](mod/notification-telegram.md).

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Before After
Before After

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