aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2021-07-08lease-script: add the order in logGravatar Christian Hesse1-2/+2
2021-07-08lease-script: implement script orderGravatar Christian Hesse10-18/+27
The order may be important: `collect-wireless-mac` can add a dns name in notification, thus `dhcp-to-dns` should run first.
2021-07-08lease-script: modify the tagGravatar Christian Hesse9-10/+10
2021-07-08netwatch-notify: run hook from a functionGravatar Christian Hesse1-23/+26
2021-07-08netwatch-notify: add error handling for hooksGravatar Christian Hesse1-2/+10
We already had syntax validation, but a script with valid synctax can still fail to run...
2021-07-07doc/lease-script: hint on script installation/execution orderGravatar Christian Hesse1-1/+6
2021-07-07doc/lease-script: fix linkGravatar Christian Hesse1-1/+1
2021-07-07collect-wireless-mac: use $EitherOr and simplify codeGravatar Christian Hesse3-12/+6
2021-07-07collect-wireless-mac: do not fail on missing dns recordGravatar Christian Hesse3-9/+12
2021-07-06collect-wireless-mac: rework, more use of arraysGravatar Christian Hesse3-61/+50
2021-07-06ospf-to-leds: do not flood but log properlyGravatar Christian Hesse1-1/+2
2021-07-05doc/netwatch-notify: hint on checking specific ispGravatar Christian Hesse1-0/+17
2021-07-01check-routeros-update: allow update for capchange-59Gravatar Michael Gisbers6-4/+10
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-01collect-wireless-mac: properly handle vanished deviceGravatar Christian Hesse3-18/+45
2021-07-01dhcp-to-dns: fix static lease that lost bound statusGravatar Christian Hesse1-1/+4
2021-07-01dhcp-to-dns: properly handle vanished leaseGravatar Christian Hesse1-23/+31
2021-07-01lease-script: do not run too many instances of scriptsGravatar Christian Hesse1-5/+7
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-01lease-script: drop the delay magic...Gravatar Christian Hesse1-6/+0
... as this should be handled by $ScriptLock in lease scripts now.
2021-07-01hotspot-to-wpa-cleanup: lock script (and wait)Gravatar Christian Hesse1-0/+3
2021-07-01dhcp-to-dns: lock script (and wait)Gravatar Christian Hesse1-0/+3
2021-07-01collect-wireless-mac: wait when locking scriptGravatar Christian Hesse3-3/+3
2021-07-01Merge branch 'ScriptLock' into nextGravatar Christian Hesse1-3/+58
2021-07-01global-functions: $ScriptLock: use hex string for ticketGravatar Christian Hesse1-2/+2
Does not matter what the ticket looks like, but using hex string it is not converted to number.
2021-07-01global-functions: $ScriptLock: use a limit on lock...Gravatar Christian Hesse1-4/+6
... to make sure it does not lock forever.
2021-06-30global-functions: $ScriptLock: allow to wait for lockGravatar Christian Hesse1-0/+6
2021-06-30global-functions: $ScriptLock: rework with ticketsGravatar Christian Hesse1-6/+40
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-30global-functions: $ScriptLock: check if script is runningGravatar Christian Hesse1-0/+4
2021-06-30global-functions: $ScriptLock: check if script existsGravatar Christian Hesse1-0/+4
2021-06-30global-functions: $ScriptLock: allow to return...Gravatar Christian Hesse1-3/+8
... with true instead of breaking with error.
2021-06-30global-functions: $LogPrintExit2: allow origin-specific debugGravatar Christian Hesse1-1/+6
Add something like this in global-config-overlay: :global PrintDebugOverride { "dhcp-to-dns"=true; }
2021-06-28global-functions: $GetRandomNumber: use $HexToNumGravatar Christian Hesse1-11/+2
2021-06-28global-functions: $GetRandom20CharHex: do not remove otp...Gravatar Christian Hesse1-3/+1
... as it is instantly invalid anyway.
2021-06-25doc/notifications: change stroke colorGravatar Christian Hesse16-53/+48
This makes the stroke visible on black background.
2021-06-24lease-script: do not run in parallel on simultaneous deassignGravatar Christian Hesse1-2/+5
2021-06-24global-functions: $RandomDelay: allow to specify unit in second argumentGravatar Christian Hesse1-1/+2
2021-06-23ppp-on-up: use $LogPrintExit2Gravatar Christian Hesse1-3/+3
This will never print to terminal, nevertheless we want proper log with script name in prefix.
2021-06-23lease-script: use $LogPrintExit2Gravatar Christian Hesse1-4/+4
This will never print to terminal, nevertheless we want proper log with script name in prefix.
2021-06-23ipv6-update: use $LogPrintExit2Gravatar Christian Hesse1-4/+6
This will never print to terminal, nevertheless we want proper log with script name in prefix.
2021-06-23hotspot-to-wpa: add optional cleanup scriptchange-58Gravatar Christian Hesse7-3/+72
2021-06-23celebrating the 1.000th commit - hooray!change-57Gravatar Christian Hesse4-3/+4
2021-06-23notify about tag in scriptschange-56Gravatar Christian Hesse4-3/+4
2021-06-23ppp-on-up: add error handlingGravatar Christian Hesse1-2/+6
2021-06-23ppp-on-up: use 'provides' to find ppp-on-up scriptsGravatar Christian Hesse2-9/+6
2021-06-23lease-script: add error handlingGravatar Christian Hesse1-2/+6
2021-06-23lease-script: use 'provides' to find lease scriptsGravatar Christian Hesse8-25/+22
2021-06-23packages-update: use 'provides' to find backup scriptsGravatar Christian Hesse4-1/+7
2021-06-23update list of contributorsGravatar Christian Hesse1-0/+1
2021-06-21global-functions: $MkDir: abuse smb share to create directoryGravatar Christian Hesse1-7/+5
The smb feature is provided by system package... So we have it anyway. It gives some benefits compared to abusing fetch: * It is faster! * No need to alter, enable and restore a service! (The share is created disabled.) * Firewall rules can not break this. * No temporary file is created. * Less code! Let's hope we do not introduce new breakage. Closes #14
2021-06-21doc/netwatch-notify: hint on checking internet connectivityGravatar Christian Hesse1-0/+14
2021-06-21doc: add sample notificationsGravatar Christian Hesse27-0/+3052
2021-06-18doc/check-health: no capital character hereGravatar Christian Hesse1-1/+1
2021-06-18Makefile: generate html files for documentationGravatar Christian Hesse1-2/+2
2021-06-17email-backup: remove attachment when sentGravatar Christian Hesse1-1/+1
2021-06-17global-functions: $NotificationFunctions->"email": support removing attachmentGravatar Christian Hesse1-2/+8
2021-06-16upload-backup: remove file after uploadGravatar Christian Hesse1-0/+4
2021-06-16global-functions: $HexToNum: properly handle capital charactersGravatar Christian Hesse1-2/+2
2021-06-15log-forward: use $HexToNum, do not resend old messagesGravatar Christian Hesse1-6/+3
Now we know the order of messages and can compare. Changing the filter does no longer result in old messages being resent.
2021-06-15global-functions: introduce $HexToNumGravatar Christian Hesse1-0/+16
2021-06-10global-functions: $SendEMail2: fix name in arrayGravatar Christian Hesse1-1/+1
This did not send anything at all... Fixes #12
2021-06-09log-forward: implement reverse logic to include messages...change-55Gravatar Christian Hesse6-7/+20
... even if a filter matches to exclude them. Let's have an example: :global LogForwardFilter "(debug|info)"; :global LogForwardInclude "account"; This will forward everything about topic *account* (login, logout, failed login, ...) - even with topic *info*.
2021-06-09log-forward: update comments in global-configGravatar Christian Hesse1-3/+4
2021-06-09doc/log-forward: mention MatrixGravatar Christian Hesse1-1/+1
2021-06-08global-functions: make Telegram notifications a modulechange-54Gravatar Christian Hesse5-160/+169
2021-06-08global-functions: implement notifications via Matrixchange-53Gravatar Michael Gisbers15-18/+186
Matrix is an open network for secure, decentralized communication - and it has a web api. A warning on message type: Using 'm.notice' breaks rendering on Element for Android (no fixed width font) and does not pop up desktop notification. Thus we use 'm.text'. Should be safe as we do not send the messages in response to other messages. https://matrix.org/
2021-06-08global-functions: make notification functions extensibleGravatar Christian Hesse1-133/+159
This allows to add notification functions without overloading functions. Just add it into the array: :set ($NotificationFunctions->"fancy-messager") do={ # notification magic here... } Adding functions $SendFancyMessager and/or $SendFancyMessager2 may be useful. Optionally a function to flush a queue may be required. A BIG FAT WARNING about function parameters: Calling a function from array results in $0 for the function name being skipped. That's why we have to add the function name manually!
2021-06-08global-functions: $ScriptInstallUpdate: drop the re-run messageGravatar Christian Hesse1-5/+0
This makes sense just rarely... For important changes we have the migration mechanism. So just drop this.
2021-06-08global-functions: $ScriptInstallUpdate: reload configuration laterGravatar Christian Hesse1-7/+12
2021-06-08global-functions: $ScriptInstallUpdate: reload functions just onceGravatar Christian Hesse1-6/+11
2021-06-08global-functions: support loading modulesGravatar Christian Hesse1-1/+6
If script's name starts with "global-functions.d/" it is handled as module: * loaded at startup * triggers reload on update
2021-06-08INITIAL-COMMANDS: make github copy function workGravatar Christian Hesse1-3/+3
The Github copy function skips all line breaks, so add some extra semicolons to fix syntax.
2021-06-06update list of contributorsGravatar Christian Hesse1-0/+1
2021-05-26Makefile: remove extra whitespaceGravatar Christian Hesse1-1/+1
2021-05-24ipv6-update: apply a mask on prefixGravatar Christian Hesse1-1/+1
Fixes #11
2021-05-21check-certificates: fix variable nameGravatar Christian Hesse1-1/+1
2021-05-19global-functions: $DownloadPackage: quote package nameGravatar Christian Hesse1-2/+2
2021-05-18netwatch-notify: add info on hook in notificationGravatar Christian Hesse1-8/+12
2021-05-18Merge branch 'lets-encrypt-ISRG-X1' into nextGravatar Christian Hesse7-94/+10
2021-05-18update Let's Encrypt trust chainchange-52Gravatar Christian Hesse4-3/+5
Drop 'DST Root CA X3', use 'ISRG Root X1' instead. The migration code makes sure that... * the intermediate certificate 'R3' is signed by 'ISRG Root X1' * 'ISRG Root X1' is self-signed, not cross-signed by 'DST Root CA X3' * 'DST Root CA X3' is finally gone
2021-05-18drop certificate DST Root CA X3Gravatar Christian Hesse3-91/+5
Let's Encrypt planned the transition to ISRG's root certificate ("ISRG Root X1") on July 8, 2019, but postponed several times. Finally they found another solution: A certificate 'ISRG Root X1', but cross-signed with 'DST Root CA X3' and with a livetime that exceeds that of the root CA. This is said to work for most operating system where root certificate authorities are just 'trust anchors'. I doubt this is true for RouterOS, where certificates are just imported into the certificate store. So let's migrate to 'ISRG Root X1' now.
2021-05-17add 'ipsec-to-dns'change-51Gravatar Christian Hesse8-3/+120
2021-05-17dhcp-to-dns: use $0 in stringsGravatar Christian Hesse1-2/+2
2021-05-17dhcp-to-dns: put string into variableGravatar Christian Hesse1-4/+5
2021-05-07README: use svg logoGravatar Christian Hesse1-1/+1
2021-05-07logo: clean png exportGravatar Christian Hesse1-0/+0
2021-05-07logo: convert text to pathGravatar Christian Hesse1-24/+35
2021-05-07logo: scale to 96x96 pixelsGravatar Christian Hesse1-18/+22
2021-05-06Merge branch 'netwatch-notify' into nextGravatar Christian Hesse6-5/+50
2021-05-06netwatch-notify: log failed resolve just onceGravatar Christian Hesse1-2/+7
2021-05-06netwatch-notify: attempt to update address with working resolver onlyGravatar Christian Hesse1-1/+2
2021-05-06netwatch-notify: support dynamic address updatechange-50Gravatar Christian Hesse6-3/+28
2021-05-06netwatch-notify: log on host up...Gravatar Christian Hesse1-2/+4
... if logged on host down before.
2021-05-05doc/netwatch-notify: tips & tricks: one of several hostsGravatar Christian Hesse1-0/+12
2021-05-03doc: inform about dependency on base installationGravatar Christian Hesse31-0/+93
That should make the documentation clearer if external sites link to the documentation of a specific script.
2021-05-03update list of contributorsGravatar Christian Hesse1-0/+1
2021-04-29upload-backup: add second symbolGravatar Christian Hesse2-1/+2
2021-04-29email-backup: add second symbolGravatar Christian Hesse1-1/+2
2021-04-29cloud-backup: add second symbolGravatar Christian Hesse2-1/+2
2021-04-29email-backup: add symbol in e-mailGravatar Christian Hesse1-1/+2
That's easy now that we use $SendEMail2...
2021-04-29email-backup: use $SendEMail2change-49Gravatar Christian Hesse6-23/+15
This drops $EmailBackupTo & $EmailBackupCc from settings! Use settings overwrite if required: :global EmailGeneralToOverride { "email-backup"="backup@example.com"; }
2021-04-29global-functions: $SendEMail2: support file attachmentsGravatar Christian Hesse1-3/+5