Dont run ssh keygen if a key exists

This commit is contained in:
Deon George 2023-07-26 21:19:44 +10:00
parent 544a712624
commit 5ea2bc5e49

4
init
View File

@ -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";;