From 5454a5f06b18f79dcc02de54a1a48358b9079c30 Mon Sep 17 00:00:00 2001 From: Michael Kroes Date: Sat, 16 Jul 2016 07:00:53 +0200 Subject: [PATCH] Remove nohup from ssh-keygen so errors aren't hidden. Also only generate a key if none exists yet --- setup/system.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setup/system.sh b/setup/system.sh index d478bd73..4206f63c 100755 --- a/setup/system.sh +++ b/setup/system.sh @@ -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 #