Remove nohup from ssh-keygen so errors aren't hidden. Also only generate a key if none exists yet

This commit is contained in:
Michael Kroes
2016-07-16 07:14:32 +02:00
parent 6b334d1e07
commit 5454a5f06b
+5 -3
View File
@@ -144,9 +144,11 @@ pollinate -q -r
# Between these two, we really ought to be all set.
echo 'Launching SSH public key creation...'
nohup ssh-keygen -t rsa -b 2048 -a 100 -f /root/.ssh/id_rsa_miab -N '' -q 2>&1 >/dev/null
# We need an ssh key to store backups via rsync, if it doesn't exist create one
if [ ! -f /root/.ssh/id_rsa_miab ]; then
echo 'Launching SSH public key creation...'
ssh-keygen -t rsa -b 2048 -a 100 -f /root/.ssh/id_rsa_miab -N '' -q
fi
# ### Package maintenance
#