mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00: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 NtfyTopicOverride;
|
||||
|
||||
:global CertificateAvailable;
|
||||
:global EitherOr;
|
||||
:global IfThenElse;
|
||||
:global LogPrintExit2;
|
||||
|
@ -85,6 +86,11 @@
|
|||
}
|
||||
|
||||
: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 \
|
||||
$Url http-header-field=$Headers http-data=$Text as-value;
|
||||
} on-error={
|
||||
|
|
Loading…
Reference in a new issue