Retry pulling keys if the file is empty
This commit is contained in:
parent
79869b493c
commit
d4d6bd2c95
2 changed files with 2 additions and 2 deletions
|
|
@ -159,7 +159,7 @@ files:
|
|||
|
||||
# Retrieve ssh keys
|
||||
mkdir -p root/.ssh/
|
||||
[ -f root/.ssh/authorized_keys ] || /usr/sbin/chroot . /usr/bin/curl -s -f https://cri.epita.fr/$(sed 's/^.*MyLogin=//p;d' etc/wireguard/adlin.conf).keys > root/.ssh/authorized_keys
|
||||
[ -s root/.ssh/authorized_keys ] || /usr/sbin/chroot . /usr/bin/curl -s -f https://cri.epita.fr/$(sed 's/^.*MyLogin=//p;d' etc/wireguard/adlin.conf).keys > root/.ssh/authorized_keys
|
||||
[ -f etc/ssh/ssh_host_rsa_key ] || /usr/sbin/chroot . ssh-keygen -A
|
||||
|
||||
# To the user
|
||||
|
|
|
|||
Reference in a new issue