1
0
mirror of https://github.com/eworm-de/routeros-scripts.git synced 2024-05-11 05:55:19 +00:00

global-functions: $CertificateNameByCN: use $CleanName

This commit is contained in:
Christian Hesse
2024-01-31 15:31:07 +01:00
parent 09988d9892
commit 821dd02e5e

View File

@@ -168,11 +168,10 @@
:set CertificateNameByCN do={ :set CertificateNameByCN do={
:local CommonName [ :tostr $1 ]; :local CommonName [ :tostr $1 ];
:global CharacterReplace; :global CleanName;
:local Cert [ /certificate/find where common-name=$CommonName ]; :local Cert [ /certificate/find where common-name=$CommonName ];
/certificate/set $Cert \ /certificate/set $Cert name=[ $CleanName $CommonName ];
name=[ $CharacterReplace [ $CharacterReplace [ $CharacterReplace $CommonName "'" "-" ] " " "-" ] "---" "-" ];
} }
# multiply given character(s) # multiply given character(s)