From 34d43eb2386606b0012b4935466b44fbb7f2d4bd Mon Sep 17 00:00:00 2001 From: Michael Stanclift Date: Mon, 1 Jun 2020 10:26:45 -0500 Subject: [PATCH] Detect .ssh folder and create if needed --- gravity-sync.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gravity-sync.sh b/gravity-sync.sh index 88ec801..dae84bd 100755 --- a/gravity-sync.sh +++ b/gravity-sync.sh @@ -613,8 +613,13 @@ function detect_sshkeygen { then MESSAGE="Using DROPBEARKEY Instead" echo_info - KEYGEN_COMMAND="dropbearkey -t rsa -f" - + if [ -d $HOME/.ssh ] + then + KEYGEN_COMMAND="dropbearkey -t rsa -f" + else + mkdir $HOME/.ssh >/dev/null 2>&1 + KEYGEN_COMMAND="dropbearkey -t rsa -f" + fi else MESSAGE="No Alternatives Located" echo_info