mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-15 12:34:27 +02:00
mod/notification-ntfy: check for root certificate availability
... at least with default server.
This commit is contained in:
parent
5932586ee4
commit
d3992c13a0
1 changed files with 6 additions and 0 deletions
|
@ -63,6 +63,7 @@
|
||||||
:global NtfyTopic;
|
:global NtfyTopic;
|
||||||
:global NtfyTopicOverride;
|
:global NtfyTopicOverride;
|
||||||
|
|
||||||
|
:global CertificateAvailable;
|
||||||
:global EitherOr;
|
:global EitherOr;
|
||||||
:global IfThenElse;
|
:global IfThenElse;
|
||||||
:global LogPrintExit2;
|
:global LogPrintExit2;
|
||||||
|
@ -85,6 +86,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
:do {
|
:do {
|
||||||
|
:if ($NtfyServer = "ntfy.sh") do={
|
||||||
|
:if ([ $CertificateAvailable "R3" ] = false) do={
|
||||||
|
$LogPrintExit2 warning $0 ("Downloading required certificate failed.") true;
|
||||||
|
}
|
||||||
|
}
|
||||||
/tool/fetch check-certificate=yes-without-crl output=none http-method=post \
|
/tool/fetch check-certificate=yes-without-crl output=none http-method=post \
|
||||||
$Url http-header-field=$Headers http-data=$Text as-value;
|
$Url http-header-field=$Headers http-data=$Text as-value;
|
||||||
} on-error={
|
} on-error={
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue