Christian Hesse
d1ef710093
global-functions: $ScriptInstallUpdate: add error handling for changelog
2021-07-09 22:04:15 +02:00
Christian Hesse
574c50908b
global-functions.d/notification-telegram: subject in bold & underline
...
This makes the subject visually delimited.
2021-07-09 21:21:30 +02:00
Christian Hesse
dc7fc0d385
finally remove old scripts
2021-07-09 12:46:03 +02:00
Christian Hesse
b864db1e38
global-functions: $ScriptInstallUpdate: add error handling for migration
2021-07-09 12:46:03 +02:00
Christian Hesse
f694e1e54d
global-functions: $ScriptInstallUpdate: drop unused variable
...
This was a left-over from re-run message.
2021-07-09 12:46:03 +02:00
Christian Hesse
81cba72bec
global-functions: $ScriptInstallUpdate: drop the migration pattern
2021-07-09 12:46:03 +02:00
Christian Hesse
d80a7efb7c
doc/netwatch-notify: hint on escaping, with example
2021-07-09 12:46:03 +02:00
Christian Hesse
bccb7c3452
netwatch-notify: implement pre-down hook
2021-07-09 12:46:03 +02:00
Christian Hesse
12d34e4a7c
collect-wireless-mac: remove 'unknown' from message and comment
...
This was true, but the mac address is no longer unknown after it was
added to address list in comment.
2021-07-09 10:40:13 +02:00
Christian Hesse
4192d30d7e
global-functions: $ScriptLock: drop variable, just return
2021-07-09 10:40:13 +02:00
Christian Hesse
a4e548eb80
global-functions: $ScriptLock: make ticket management more reliable
2021-07-08 21:03:31 +02:00
Christian Hesse
6c9f733d96
lease-script: add the order in log
2021-07-08 21:03:31 +02:00
Christian Hesse
6bf8cd5fac
lease-script: implement script order
...
The order may be important: `collect-wireless-mac` can add a dns name
in notification, thus `dhcp-to-dns` should run first.
2021-07-08 21:03:31 +02:00
Christian Hesse
623fd707c4
lease-script: modify the tag
2021-07-08 16:09:03 +02:00
Christian Hesse
c5d49b37f3
netwatch-notify: run hook from a function
2021-07-08 13:38:21 +02:00
Christian Hesse
87ce4a86b7
netwatch-notify: add error handling for hooks
...
We already had syntax validation, but a script with valid synctax can
still fail to run...
2021-07-08 13:02:57 +02:00
Christian Hesse
1eb337d87f
doc/lease-script: hint on script installation/execution order
2021-07-07 00:33:36 +02:00
Christian Hesse
d7170bf138
doc/lease-script: fix link
2021-07-07 00:33:36 +02:00
Christian Hesse
e5674dec24
collect-wireless-mac: use $EitherOr and simplify code
2021-07-07 00:33:34 +02:00
Christian Hesse
c982cde0bd
collect-wireless-mac: do not fail on missing dns record
2021-07-07 00:32:50 +02:00
Christian Hesse
5083ffd12f
collect-wireless-mac: rework, more use of arrays
2021-07-06 21:41:33 +02:00
Christian Hesse
92a97b12ca
ospf-to-leds: do not flood but log properly
2021-07-06 21:41:33 +02:00
Christian Hesse
fcc0d1551a
doc/netwatch-notify: hint on checking specific isp
2021-07-05 15:00:47 +02:00
Michael Gisbers
d5edcbd3b6
check-routeros-update: allow update for cap
...
If CAPsMAN is running on a device with just 16MB flash downloading the
packages is not possible (or at least lost at reboot). So allow a CAP to
update with opt-in.
2021-07-01 22:56:18 +02:00
Christian Hesse
877e95d4be
collect-wireless-mac: properly handle vanished device
2021-07-01 22:52:38 +02:00
Christian Hesse
5f357fd242
dhcp-to-dns: fix static lease that lost bound status
2021-07-01 22:52:38 +02:00
Christian Hesse
23daea2354
dhcp-to-dns: properly handle vanished lease
2021-07-01 22:52:38 +02:00
Christian Hesse
9c9fb46e4a
lease-script: do not run too many instances of scripts
...
Every instance of the scripts does all the work. If one script is running
and a second script is waiting we do not have to start a third one.
2021-07-01 22:52:38 +02:00
Christian Hesse
5f2bc87b22
lease-script: drop the delay magic...
...
... as this should be handled by $ScriptLock in lease scripts now.
2021-07-01 22:52:38 +02:00
Christian Hesse
08b1b72fa9
hotspot-to-wpa-cleanup: lock script (and wait)
2021-07-01 22:52:38 +02:00
Christian Hesse
64b53d2322
dhcp-to-dns: lock script (and wait)
2021-07-01 22:52:38 +02:00
Christian Hesse
df43f61018
collect-wireless-mac: wait when locking script
2021-07-01 22:52:38 +02:00
Christian Hesse
3f893a327d
Merge branch 'ScriptLock' into next
2021-07-01 22:52:23 +02:00
Christian Hesse
aad91d90ea
global-functions: $ScriptLock: use hex string for ticket
...
Does not matter what the ticket looks like, but using hex string it is
not converted to number.
2021-07-01 22:37:03 +02:00
Christian Hesse
0b4c1861cf
global-functions: $ScriptLock: use a limit on lock...
...
... to make sure it does not lock forever.
2021-07-01 22:37:03 +02:00
Christian Hesse
7de3457f44
global-functions: $ScriptLock: allow to wait for lock
2021-06-30 21:28:27 +02:00
Christian Hesse
5d30886e59
global-functions: $ScriptLock: rework with tickets
...
Getting the order right is not easy... We use a global variable to store
"tickets" in an array. Based on that scripts know their order.
2021-06-30 21:28:27 +02:00
Christian Hesse
b2d0ed1240
global-functions: $ScriptLock: check if script is running
2021-06-30 21:18:38 +02:00
Christian Hesse
e13e3cfe34
global-functions: $ScriptLock: check if script exists
2021-06-30 21:16:17 +02:00
Christian Hesse
301ad4b3e5
global-functions: $ScriptLock: allow to return...
...
... with true instead of breaking with error.
2021-06-30 11:13:50 +02:00
Christian Hesse
89f8dc7120
global-functions: $LogPrintExit2: allow origin-specific debug
...
Add something like this in global-config-overlay:
:global PrintDebugOverride {
"dhcp-to-dns"=true;
}
2021-06-30 11:12:12 +02:00
Christian Hesse
679917390b
global-functions: $GetRandomNumber: use $HexToNum
2021-06-28 21:33:13 +02:00
Christian Hesse
cfc400b3d5
global-functions: $GetRandom20CharHex: do not remove otp...
...
... as it is instantly invalid anyway.
2021-06-28 21:33:13 +02:00
Christian Hesse
7f2314d999
doc/notifications: change stroke color
...
This makes the stroke visible on black background.
2021-06-25 10:06:24 +02:00
Christian Hesse
407a379f1d
lease-script: do not run in parallel on simultaneous deassign
2021-06-24 22:28:08 +02:00
Christian Hesse
855399b2bc
global-functions: $RandomDelay: allow to specify unit in second argument
2021-06-24 22:28:08 +02:00
Christian Hesse
39b7bddf49
ppp-on-up: use $LogPrintExit2
...
This will never print to terminal, nevertheless we want proper
log with script name in prefix.
2021-06-23 15:15:19 +02:00
Christian Hesse
f26b3da342
lease-script: use $LogPrintExit2
...
This will never print to terminal, nevertheless we want proper
log with script name in prefix.
2021-06-23 15:15:19 +02:00
Christian Hesse
cd0398acf9
ipv6-update: use $LogPrintExit2
...
This will never print to terminal, nevertheless we want proper
log with script name in prefix.
2021-06-23 15:15:19 +02:00
Christian Hesse
1a404195d5
hotspot-to-wpa: add optional cleanup script
2021-06-23 15:15:16 +02:00