mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-07-05 17:01:38 +00:00
Compare commits
72 commits
b5e6b9cb55
...
0b87310301
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b87310301 | ||
|
|
604a6b8bed | ||
|
|
dc44c0ae81 | ||
|
|
29a9afc16e | ||
|
|
5d31c7fe97 | ||
|
|
5bba3b1864 | ||
|
|
71a26889a4 | ||
|
|
a9783861b4 | ||
|
|
297566ed65 | ||
|
|
fd2550e535 | ||
|
|
1ec29b6e0e | ||
|
|
9562c83ae3 | ||
|
|
5b92940f84 | ||
|
|
a9d64db101 | ||
|
|
f3c3ec9380 | ||
|
|
e8bf1dce94 | ||
|
|
59db8187a8 | ||
|
|
ff6bd36921 | ||
|
|
e5796a0d4f | ||
|
|
68e21a3da2 | ||
|
|
cba6ea1653 | ||
|
|
36a1bc538e | ||
|
|
32be7bd702 | ||
|
|
6ef6db7f8b | ||
|
|
41f2c83b47 | ||
|
|
9126f043fa | ||
|
|
4e0f345a04 | ||
|
|
cb54859cad | ||
|
|
42059ef78f | ||
|
|
2b99e3061a | ||
|
|
bf77b845b9 | ||
|
|
96f57a9096 | ||
|
|
bddb51064e | ||
|
|
fcbe474d1a | ||
|
|
c9853049af | ||
|
|
d5e063d759 | ||
|
|
59d66b3261 | ||
|
|
67b3da107f | ||
|
|
0740e343e2 | ||
|
|
21d2bf0d90 | ||
|
|
570d539476 | ||
|
|
aa4dd64ea8 | ||
|
|
1b30e2fc5b | ||
|
|
9cbbdad9e9 | ||
|
|
42fc4e0f39 | ||
|
|
85f4319593 | ||
|
|
f610b1edee | ||
|
|
088d9bd081 | ||
|
|
fd6e1173c0 | ||
|
|
7de385d27c | ||
|
|
fc75f98657 | ||
|
|
d8169c6bb5 | ||
|
|
4fd526696e | ||
|
|
7f0fbbb397 | ||
|
|
c63b19f4cb | ||
|
|
3336bfa4d5 | ||
|
|
dbab186376 | ||
|
|
a5ff54e9f5 | ||
|
|
f314ce92d5 | ||
|
|
bc195a192b | ||
|
|
1e4ded15ea | ||
|
|
490df0cb84 | ||
|
|
8c487c8190 | ||
|
|
15ea9f9795 | ||
|
|
8ff4ecc68a | ||
|
|
7ce1931156 | ||
|
|
a41d33a7ba | ||
|
|
b7c1eb1067 | ||
|
|
90758e3d53 | ||
|
|
2f07a4978b | ||
|
|
3476ce35b3 | ||
|
|
be69b98d8c |
4 changed files with 22 additions and 4 deletions
|
|
@ -37,7 +37,8 @@ Also make sure the device has correct time configured, best is to set up
|
|||
the ntp client.
|
||||
|
||||
Then edit `global-config-overlay`, add `EmailGeneralTo` with a valid
|
||||
recipient address. Finally reload the configuration.
|
||||
recipient address. Optionally add `EmailServerCertificate` if you have
|
||||
certificate verification enabled. Finally reload the configuration.
|
||||
|
||||
> ℹ️ **Info**: Copy relevant configuration from
|
||||
> [`global-config`](../../global-config.rsc) (the one without `-overlay`) to
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
:global EmailGeneralCc "";
|
||||
#:global EmailGeneralTo "mail@example.com";
|
||||
#:global EmailGeneralCc "another@example.com,third@example.com";
|
||||
:global EmailServerCertificate "";
|
||||
|
||||
# You can send Telegram notifications. Register a bot
|
||||
# and add the token and chat ids here, then install the module:
|
||||
|
|
|
|||
|
|
@ -109,11 +109,13 @@
|
|||
:local UseFor [ :tostr $2 ];
|
||||
|
||||
:global CertificateDownload;
|
||||
:global EitherOr;
|
||||
:global LogPrint;
|
||||
:global ParseKeyValueStore;
|
||||
|
||||
:set UseFor [ $EitherOr $UseFor "undefined" ];
|
||||
:if ([ :len $UseFor ] = 0) do={
|
||||
$LogPrint warning $0 ("The intended use is undefined!");
|
||||
:set UseFor "undefined";
|
||||
}
|
||||
|
||||
:if ([ /system/resource/get free-hdd-space ] < 8388608 && \
|
||||
[ /certificate/settings/get crl-download ] = true && \
|
||||
|
|
@ -186,7 +188,11 @@
|
|||
$LogPrint warning $0 ("Failed downloading certificate with CommonName '" . $CommonName . \
|
||||
"' from repository! Trying fallback to mkcert.org...");
|
||||
:do {
|
||||
:if ([ :len [ /certificate/find where common-name="ISRG Root X1" ] ] = 0) do={
|
||||
:local CertSettings [ /certificate/settings/get ];
|
||||
:if ([ :len [ /certificate/find where common-name="ISRG Root X1" ] ] = 0 && \
|
||||
!((($CertSettings->"builtin-trust-store") ~ "fetch" || \
|
||||
($CertSettings->"builtin-trust-store") = "all") && \
|
||||
[ :len [ /certificate/builtin/find where common-name="ISRG Root X1" ] ] > 0)) do={
|
||||
$LogPrint error $0 ("Required certificate is not available.");
|
||||
:return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,9 @@
|
|||
# flush e-mail queue
|
||||
:set FlushEmailQueue do={ :onerror Err {
|
||||
:global EmailQueue;
|
||||
:global EmailServerCertificate;
|
||||
|
||||
:global CertificateAvailable;
|
||||
:global EitherOr;
|
||||
:global EMailGenerateFrom;
|
||||
:global FileExists;
|
||||
|
|
@ -90,6 +92,14 @@
|
|||
:return false;
|
||||
}
|
||||
|
||||
:if ([ /tool/e-mail/get certificate-verification ] ~ "^yes" && \
|
||||
[ :len $EmailServerCertificate ] > 0) do={
|
||||
:if ([ $CertificateAvailable $EmailServerCertificate "email" ] = false) do={
|
||||
$LogPrint warning $0 ("Downloading required certificate failed.");
|
||||
:return false;
|
||||
}
|
||||
}
|
||||
|
||||
/system/scheduler/set interval=($QueueLen . "m") comment="Sending..." \
|
||||
[ find where name="_FlushEmailQueue" ];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue