Dont run ssh keygen if a key exists
This commit is contained in:
parent
544a712624
commit
5ea2bc5e49
4
init
4
init
@ -1,12 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
#set -e
|
set -e
|
||||||
|
|
||||||
generate_host_key_type() {
|
generate_host_key_type() {
|
||||||
local bit_size key_type
|
local bit_size key_type
|
||||||
|
|
||||||
key_type=$1
|
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
|
case $key_type in
|
||||||
ecdsa) bit_size="$ecdsa_bit_size";;
|
ecdsa) bit_size="$ecdsa_bit_size";;
|
||||||
rsa) bit_size="$rsa_bit_size";;
|
rsa) bit_size="$rsa_bit_size";;
|
||||||
|
Loading…
Reference in New Issue
Block a user