mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-29 07:14:45 +02:00
check-certificates: simplify return from function...
... and also break earch on success.
This commit is contained in:
parent
512c54bd59
commit
e833dfcf25
1 changed files with 2 additions and 4 deletions
|
@ -48,8 +48,6 @@
|
|||
:global UrlEncode;
|
||||
:global WaitForFile;
|
||||
|
||||
:local Return false;
|
||||
|
||||
:foreach Type in={ "pem"; "p12" } do={
|
||||
:local CertFileName ([ $UrlEncode $FetchName ] . "." . $Type);
|
||||
$LogPrint debug $ScriptName ("Trying type '" . $Type . "' for '" . $CertName . \
|
||||
|
@ -84,13 +82,13 @@
|
|||
$CertificateNameByCN [ /certificate/get $CertInChain common-name ];
|
||||
}
|
||||
|
||||
:set Return true;
|
||||
:return true;
|
||||
} on-error={
|
||||
$LogPrint debug $ScriptName ("Could not download certificate file '" . $CertFileName . "'.");
|
||||
}
|
||||
}
|
||||
|
||||
:return $Return;
|
||||
:return false;
|
||||
}
|
||||
|
||||
:local FormatInfo do={
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue