mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
mod/notification-ntfy: check for root certificate availability
... at least with default server.
This commit is contained in:
@ -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={
|
||||
|
Reference in New Issue
Block a user