Commit graph

2442 commits

Author SHA1 Message Date
Christian Hesse
6f29c640e4 netwatch-notify: move check in DNS cache to local function 2024-02-28 23:01:43 +01:00
Christian Hesse
01d2c3ea7e netwatch-notify: try another workaround
The last one did not make it... Perhaps the cache just needs
a moment to settle?
2024-02-28 23:01:43 +01:00
Christian Hesse
93bed1b081 netwatch-notify: work around race condition
This used to crash every now and then with:

> script;error script error: no such item (4)

I guess this is caused by querying the dns cache just exactly when a
record expires. The chance is maximized: The script is started by
scheduler every minute, and the record's ttl is a multiple of a minute.

Let's query records that are not about to expire immediately, and
try again.
2024-02-28 23:01:43 +01:00
Christian Hesse
c2f5272f18 netwatch-notify: restore the check 🥴
This reverts commit 28da1da49e.

Chances are that we have to resolve a CNAME, that does not match when
querying the cache.

How to handle CNAME do multiple A records? 🤨
2024-02-28 23:01:43 +01:00
Christian Hesse
45875ad68e netwatch-notify: simplify the check 2024-02-28 23:01:43 +01:00
Christian Hesse
b1199ca50a netwatch-notify: ... and switch state to "unknown" on host update 2024-02-28 23:01:43 +01:00
Christian Hesse
1344694708 netwatch-notify: handle status "down" in its own condition...
... instead of else-branch.

This makes sure to skip hosts that just became "unknown".
(Possible soon!)
2024-02-28 23:01:43 +01:00
Christian Hesse
1c2048628d netwatch-notify: use logical operator, no literal "and"
Just like we do everywhere else.
2024-02-28 23:01:43 +01:00
Christian Hesse
471e0ead05 doc/netwatch-notify: update for multiple records 2024-02-28 23:01:00 +01:00
Christian Hesse
b286cb6803 netwatch-notify: do not update with record in cache
Using `:resolve` we have just one address, but chances are several
records do exist. These end up in cache, so we are happy to find them
there - no need to update then.
2024-02-19 11:03:17 +01:00
Christian Hesse
872abbea7d doc/unattended-lte-firmware-upgrade: more devices supported... 2024-02-08 21:02:06 +01:00
Christian Hesse
860acffbdb unattended-lte-firmware-upgrade: add error handling 2024-02-08 21:02:06 +01:00
Christian Hesse
e83154c9c3 check-lte-firmware-upgrade: give more detailed infos on modem 2024-02-08 20:54:02 +01:00
Christian Hesse
643f15a0b9 introduce BRANCHES info 2024-02-02 21:06:11 +01:00
Christian Hesse
53b09529a8 doc/backup-partition: add warning about RouterOS version 2024-02-02 12:53:45 +01:00
Christian Hesse
c21da0454b backup-partition: make sure to remove the scheduler on failure 2024-02-02 12:53:45 +01:00
Christian Hesse
7b30af90b7 backup-partition: get the actual real name...
... to prevent confusion after restore.
2024-02-02 12:53:45 +01:00
Christian Hesse
0694d9af3e backup-partition: add a scheduler in backup...
... that logs a warning when backup is booted.
2024-02-02 12:53:45 +01:00
Christian Hesse
77ef9b2c95 backup-partition: use plain variable for name 2024-02-02 10:40:59 +01:00
Christian Hesse
ed00c0877f INITIAL-COMMANDS: link initial commands above 2024-02-01 15:39:39 +01:00
Christian Hesse
64e53a7d32 packages-update: schedule reboot at pre-calculated time 2024-01-31 23:16:41 +01:00
Christian Hesse
461f7b6e76 packages-update: move output and logging to local function...
... and pass script name for clean logging.
2024-01-31 23:10:15 +01:00
Christian Hesse
237dcd7261 packages-update: prepare message and mention time zone 2024-01-31 23:10:15 +01:00
Christian Hesse
c1568a33dd backup-upload: use $CleanName 2024-01-31 23:10:15 +01:00
Christian Hesse
d0ff07b3cc backup-email: use $CleanName 2024-01-31 23:10:15 +01:00
Christian Hesse
c5714e5dc8 dhcp-to-dns: use $CleanName 2024-01-31 23:10:15 +01:00
Christian Hesse
821dd02e5e global-functions: $CertificateNameByCN: use $CleanName 2024-01-31 23:10:15 +01:00
Christian Hesse
09988d9892 global-functions: introduce $CleanName 2024-01-31 23:10:15 +01:00
Christian Hesse
b548ffee59 global-functions: $MkDir: drop declaration of unused functions 2024-01-31 23:10:15 +01:00
Christian Hesse
ed28ade712 global-functions: $IsDNSResolving: drop declaration of unused function 2024-01-31 23:10:15 +01:00
Christian Hesse
fb463419fe check-certificates: always quote the certificate name 2024-01-30 15:00:31 +01:00
Christian Hesse
5b6ed4216e global-functions: $ScriptInstallUpdate: warn just once...
... for every script on required RouterOS version.
2024-01-30 07:18:38 +01:00
Christian Hesse
07cdeadf43 log-forward: use $MAX 2024-01-30 07:10:51 +01:00
Christian Hesse
777b2ba7a2 Merge branch 'jobname' into next 2024-01-30 00:52:21 +01:00
Christian Hesse
b679eefcf7 update-tunnelbroker: use :jobname to get script name 2024-01-30 00:52:21 +01:00
Christian Hesse
af7031cc56 update-gre-address: use :jobname to get script name 2024-01-30 00:52:21 +01:00
Christian Hesse
24b681761b telegram-chat: use :jobname to get script name 2024-01-30 00:52:21 +01:00
Christian Hesse
6e54c7c30b sms-forward: use :jobname to get script name 2024-01-30 00:52:21 +01:00
Christian Hesse
58748eea3c sms-action: use :jobname to get script name 2024-01-30 00:52:21 +01:00
Christian Hesse
791b04bbe4 ppp-on-up: use :jobname to get script name 2024-01-30 00:52:21 +01:00
Christian Hesse
322466fd00 packages-update: use :jobname to get script name 2024-01-30 00:52:21 +01:00
Christian Hesse
cbdfa98576 ospf-to-leds: use :jobname to get script name 2024-01-30 00:52:21 +01:00
Christian Hesse
45fda69d3b netwatch-notify: use :jobname to get script name 2024-01-30 00:52:21 +01:00
Christian Hesse
80f587ddb5 netwatch-dns: use :jobname to get script name 2024-01-30 00:52:21 +01:00
Christian Hesse
5d40075e44 mode-button: use :jobname to get script name 2024-01-30 00:52:21 +01:00
Christian Hesse
4653c94f3f log-forward: use :jobname to get script name 2024-01-30 00:52:21 +01:00
Christian Hesse
b4d666ef1d lease-script: use :jobname to get script name 2024-01-30 00:52:21 +01:00
Christian Hesse
19e759d8fb ipv6-update: use :jobname to get script name 2024-01-30 00:52:21 +01:00
Christian Hesse
aca18f9cc2 ipsec-to-dns: use :jobname to get script name 2024-01-30 00:52:21 +01:00
Christian Hesse
79660f10db hotspot-to-wpa-cleanup: use :jobname to get script name 2024-01-30 00:52:21 +01:00