Compare commits

..

7 commits

Author SHA1 Message Date
Christian Hesse
b3c2b67461 global-functions: $ScriptLock: increase interval with wait time
Inspired by: https://github.com/eworm-de/routeros-scripts/issues/95#issuecomment-2773513467
2025-04-08 16:06:55 +02:00
Miquel Bonastre
a36daed8be INITIAL-COMMANDS: add status output 2025-04-08 16:06:55 +02:00
Miquel Bonastre
20ae1250fb INITIAL-COMMANDS: support installation from custom server
Closes: https://github.com/eworm-de/routeros-scripts/pull/96
2025-04-08 16:06:49 +02:00
Christian Hesse
31180ae33a global-functions: $CertificateNameByCN: return false without match...
... and return true on success.
2025-04-08 14:46:44 +02:00
Christian Hesse
7de9c64776 global-functions: $CertificateNameByCN: pick the first match only 2025-04-08 09:13:59 +02:00
Christian Hesse
c67f598dea global-functions: $CertificateNameByCN: support matching by fingerprint and name 2025-04-08 09:13:59 +02:00
Christian Hesse
89c0ad5e91 global-functions: $CertificateDownload: no infinite loop
We can not call $CertificateAvailable here, as that will most likely
cause an infinite loop. After all that's the certificate mkcert.org is
using. And it *is* available in this repository.
2025-04-08 09:13:59 +02:00

View file

@ -206,11 +206,9 @@
:local Match [ :tostr $1 ];
:global CleanName;
:global LogPrint;
:local Cert ([ /certificate/find where (common-name=$Match or fingerprint=$Match or name=$Match) ]->0);
:if ([ :len $Cert ] = 0) do={
$LogPrint warning $0 ("No matching certificate found.");
:return false;
}
:local CommonName [ /certificate/get $Cert common-name ];