Rewrite the logic to fetch the public SSH key

This commit is contained in:
Pothi Kalimuthu 2022-01-03 21:20:55 +05:30
parent da3bd256f2
commit 30fa0dbb5e
2 changed files with 8 additions and 4 deletions

View file

@ -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;

View file

@ -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;