Commit graph

2053 commits

Author SHA1 Message Date
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
Christian Hesse
f5b1f9cb97 celebrating the 1.000th commit - hooray! 2021-06-23 15:14:38 +02:00
Christian Hesse
64496d76c2 notify about tag in scripts 2021-06-23 10:26:49 +02:00
Christian Hesse
037d287e5b ppp-on-up: add error handling 2021-06-23 10:26:49 +02:00
Christian Hesse
aad2e062e5 ppp-on-up: use 'provides' to find ppp-on-up scripts 2021-06-23 10:21:34 +02:00
Christian Hesse
96a92bb30c lease-script: add error handling 2021-06-23 08:38:44 +02:00
Christian Hesse
2041390f55 lease-script: use 'provides' to find lease scripts 2021-06-23 08:38:44 +02:00
Christian Hesse
420986fdfc packages-update: use 'provides' to find backup scripts 2021-06-23 08:38:44 +02:00
Christian Hesse
06a0f42039 update list of contributors 2021-06-23 08:38:17 +02:00
Christian Hesse
7fb4fdfca2 global-functions: $MkDir: abuse smb share to create directory
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-21 22:58:17 +02:00
Christian Hesse
c0b954abbb doc/netwatch-notify: hint on checking internet connectivity 2021-06-21 09:15:05 +02:00
Christian Hesse
bad6f5a7cc doc: add sample notifications 2021-06-21 08:54:04 +02:00
Christian Hesse
a3efb67ed1 doc/check-health: no capital character here 2021-06-18 11:23:58 +02:00
Christian Hesse
a1fc02e667 Makefile: generate html files for documentation 2021-06-18 11:23:58 +02:00
Christian Hesse
e375494d00 email-backup: remove attachment when sent 2021-06-17 15:06:35 +02:00
Christian Hesse
34c9da5aa2 global-functions: $NotificationFunctions->"email": support removing attachment 2021-06-17 15:06:35 +02:00
Christian Hesse
1e1b98b161 upload-backup: remove file after upload 2021-06-16 14:59:16 +02:00
Christian Hesse
c60c96e32a global-functions: $HexToNum: properly handle capital characters 2021-06-16 10:16:35 +02:00
Christian Hesse
1ce0f63ef7 log-forward: use $HexToNum, do not resend old messages
Now we know the order of messages and can compare. Changing the filter
does no longer result in old messages being resent.
2021-06-15 16:59:02 +02:00
Christian Hesse
babcc00dcd global-functions: introduce $HexToNum 2021-06-15 14:38:02 +02:00
Christian Hesse
4cc8a0e160 global-functions: $SendEMail2: fix name in array
This did not send anything at all...

Fixes #12
2021-06-10 07:52:43 +02:00
Christian Hesse
de61c14c60 log-forward: implement reverse logic to include messages...
... 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-09 14:42:43 +02:00
Christian Hesse
d5f43aa26d log-forward: update comments in global-config 2021-06-09 14:42:43 +02:00
Christian Hesse
401f179ae9 doc/log-forward: mention Matrix 2021-06-09 14:41:09 +02:00
Christian Hesse
50d1706a06 global-functions: make Telegram notifications a module 2021-06-08 21:07:25 +02:00
Michael Gisbers
8375673d93 global-functions: implement notifications via Matrix
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-08 21:07:25 +02:00
Christian Hesse
7a43bfbc6a global-functions: make notification functions extensible
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-08 21:07:24 +02:00
Christian Hesse
b866eca3ec global-functions: $ScriptInstallUpdate: drop the re-run message
This makes sense just rarely... For important changes we have the
migration mechanism. So just drop this.
2021-06-08 21:07:24 +02:00
Christian Hesse
f9a2afdeda global-functions: $ScriptInstallUpdate: reload configuration later 2021-06-08 21:07:24 +02:00
Christian Hesse
2315d6bc59 global-functions: $ScriptInstallUpdate: reload functions just once 2021-06-08 21:07:24 +02:00
Christian Hesse
57b0f1b2dd global-functions: support loading modules
If script's name starts with "global-functions.d/" it is handled
as module:

 * loaded at startup
 * triggers reload on update
2021-06-08 21:07:24 +02:00
Christian Hesse
a1c8716a95 INITIAL-COMMANDS: make github copy function work
The Github copy function skips all line breaks, so add some extra
semicolons to fix syntax.
2021-06-08 20:58:25 +02:00
Christian Hesse
7de5b58ad4 update list of contributors 2021-06-06 21:41:42 +02:00
Christian Hesse
80ee7d3bdd Makefile: remove extra whitespace 2021-05-26 08:51:51 +02:00
Christian Hesse
e74b2e03a2 ipv6-update: apply a mask on prefix
Fixes #11
2021-05-24 21:32:56 +02:00
Christian Hesse
330bc7fc8b check-certificates: fix variable name 2021-05-21 08:31:45 +02:00
Christian Hesse
45dd33c90a global-functions: $DownloadPackage: quote package name 2021-05-19 14:03:18 +02:00
Christian Hesse
05a7ae409b netwatch-notify: add info on hook in notification 2021-05-18 16:44:07 +02:00
Christian Hesse
5037dbbedc Merge branch 'lets-encrypt-ISRG-X1' into next 2021-05-18 16:33:52 +02:00
Christian Hesse
4427cabd0e update Let's Encrypt trust chain
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-18 16:33:35 +02:00
Christian Hesse
f2433b8091 drop certificate DST Root CA X3
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-18 16:32:26 +02:00
Christian Hesse
862417b8d3 add 'ipsec-to-dns' 2021-05-17 16:41:51 +02:00
Christian Hesse
604306f220 dhcp-to-dns: use $0 in strings 2021-05-17 16:19:57 +02:00
Christian Hesse
2ba389a2be dhcp-to-dns: put string into variable 2021-05-17 16:18:07 +02:00
Christian Hesse
ed1a6c5de9 README: use svg logo 2021-05-07 09:18:39 +02:00
Christian Hesse
cd330a8518 logo: clean png export 2021-05-07 09:18:39 +02:00
Christian Hesse
2c77db52bf logo: convert text to path 2021-05-07 09:16:52 +02:00
Christian Hesse
8ac4f6570a logo: scale to 96x96 pixels 2021-05-07 09:16:52 +02:00