mirror of
https://github.com/nymurbd/MikroTik-scripts.git
synced 2025-07-10 10:04:30 +02:00
global-functions: $GetMacVendor: check status of certificate download
This commit is contained in:
parent
abb97601ce
commit
e963e09114
1 changed files with 5 additions and 3 deletions
|
@ -256,11 +256,13 @@
|
||||||
:local Mac [ :tostr $1 ];
|
:local Mac [ :tostr $1 ];
|
||||||
|
|
||||||
:global CertificateAvailable;
|
:global CertificateAvailable;
|
||||||
|
:global LogPrintExit;
|
||||||
|
|
||||||
:do {
|
:do {
|
||||||
:local Vendor;
|
:if ([ $CertificateAvailable "Let's Encrypt Authority X3" ] = false) do={
|
||||||
$CertificateAvailable "Let's Encrypt Authority X3";
|
$LogPrintExit warning ("Downloading required certificate failed.") true;
|
||||||
:set Vendor ([ / tool fetch check-certificate=yes-without-crl \
|
}
|
||||||
|
:local Vendor ([ / tool fetch check-certificate=yes-without-crl \
|
||||||
("https://api.macvendors.com/" . [ :pick $Mac 0 8 ]) output=user as-value ]->"data");
|
("https://api.macvendors.com/" . [ :pick $Mac 0 8 ]) output=user as-value ]->"data");
|
||||||
:return $Vendor;
|
:return $Vendor;
|
||||||
} on-error={
|
} on-error={
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue