mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-06-21 01:25:52 +02:00
mod/ssh-keys-import: :do ... on-error=... -> ... well... - fix condition 🥴
This commit is contained in:
parent
9cd4ed08a4
commit
c757064eb9
1 changed files with 1 additions and 3 deletions
|
@ -94,9 +94,7 @@
|
|||
:foreach KeyVal in=[ :deserialize $Keys delimiter=" " from=dsv options=dsv.plain ] do={
|
||||
:local Continue false;
|
||||
:if ($KeyVal->0 = "ssh-ed25519" || $KeyVal->0 = "ssh-rsa") do={
|
||||
:do {
|
||||
$SSHKeysImport ($KeyVal->0 . " " . $KeyVal->1 . " " . $KeyVal->2) $User;
|
||||
} on-error={
|
||||
:if ([ $SSHKeysImport ($KeyVal->0 . " " . $KeyVal->1 . " " . $KeyVal->2) $User ] = false) do={
|
||||
$LogPrint warning $0 ("Failed importing key for user '" . $User . "'.");
|
||||
}
|
||||
:set Continue true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue