mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-05-31 15:52:37 +00:00
fw-addr-lists: support giving several certificates...
... by delimiting with a colon.
This commit is contained in:
parent
e93422670f
commit
8eefd0ea38
2 changed files with 9 additions and 7 deletions
|
|
@ -4,7 +4,7 @@ Download, import and update firewall address-lists
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2023-2026 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.19
|
||||
# requires RouterOS, version=7.21
|
||||
#
|
||||
# download, import and update firewall address-lists
|
||||
# https://rsc.eworm.de/doc/fw-addr-lists.md
|
||||
|
|
@ -72,11 +72,13 @@
|
|||
:local Data false;
|
||||
:local TimeOut [ $EitherOr [ :totime ($List->"timeout") ] $FwAddrListTimeOut ];
|
||||
|
||||
:if ([ :len ($List->"cert") ] > 0) do={
|
||||
:set CheckCertificate true;
|
||||
:if ([ $CertificateAvailable ($List->"cert") "fetch" ] = false) do={
|
||||
$LogPrint warning $ScriptName ("Downloading required certificate (" . $FwListName . \
|
||||
" / " . $List->"url" . ") failed, trying anyway.");
|
||||
:foreach Cert in=[ :toarray delimiter=":" ($List->"cert") ] do={
|
||||
:if ([ :len ($Cert) ] > 0) do={
|
||||
:set CheckCertificate true;
|
||||
:if ([ $CertificateAvailable $Cert "fetch" ] = false) do={
|
||||
$LogPrint warning $ScriptName ("Downloading required certificate (" . $FwListName . \
|
||||
" / " . $List->"url" . ") failed, trying anyway.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue