From 5ea2bc5e49d6a15a865ea74f1553d78b41741798 Mon Sep 17 00:00:00 2001 From: Deon George Date: Wed, 26 Jul 2023 21:19:44 +1000 Subject: [PATCH] Dont run ssh keygen if a key exists --- init | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init b/init index d52f1d7..0ed1ba2 100755 --- a/init +++ b/init @@ -1,12 +1,12 @@ #!/bin/sh -#set -e +set -e generate_host_key_type() { local bit_size key_type key_type=$1 - if [ ! -f /etc/ssh/ssh_host_"${key_type}"_key ]; then + if [ ! -f ${SSH_KEY_PATH}/ssh_host_"${key_type}"_key ]; then case $key_type in ecdsa) bit_size="$ecdsa_bit_size";; rsa) bit_size="$rsa_bit_size";;