mirror of
https://github.com/pothi/mikrotik-scripts.git
synced 2025-07-16 01:24:28 +02:00
Rewrite the logic to fetch the public SSH key
This commit is contained in:
parent
da3bd256f2
commit
30fa0dbb5e
2 changed files with 8 additions and 4 deletions
|
@ -60,8 +60,10 @@
|
|||
|
||||
# install public SSH key
|
||||
:put "Configuring SSH...";
|
||||
/tool fetch https://launchpad.net/~pothi/+sshkeys dst-path=pothi-ssh-key-rsa;
|
||||
:delay 5s;
|
||||
{
|
||||
:local result [ /tool fetch https://launchpad.net/~pothi/+sshkeys dst-path=pothi-ssh-key-rsa as-value];
|
||||
:do { :delay 2s } while=( $result->"status" != "finished" )
|
||||
}
|
||||
/user ssh-keys import public-key-file=pothi-ssh-key-rsa;
|
||||
/file remove pothi-ssh-key-rsa;
|
||||
|
||||
|
|
|
@ -44,8 +44,10 @@
|
|||
# Wireless tweaks
|
||||
|
||||
# install public SSH key
|
||||
/tool fetch https://launchpad.net/~pothi/+sshkeys dst-path=pothi-ssh-key-rsa;
|
||||
:delay 5s;
|
||||
{
|
||||
:local result [ /tool fetch https://launchpad.net/~pothi/+sshkeys dst-path=pothi-ssh-key-rsa as-value];
|
||||
:while ($result->"status" != "finished") do={ :delay 2s }
|
||||
}
|
||||
/user ssh-keys import public-key-file=pothi-ssh-key-rsa;
|
||||
/file remove pothi-ssh-key-rsa;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue