fix check for empty sshd dir
This commit is contained in:
parent
cfabbd0a68
commit
a0ffb0ab9c
@ -58,7 +58,7 @@ if [[ "${ROOT_KEYPAIR_LOGIN_ENABLED}" == "true" ]]; then
|
||||
fi
|
||||
|
||||
# initiate default sshd-config if there is none available
|
||||
if ! find "/etc/ssh" -mindepth 1 -print -quit 2>/dev/null | grep -q .; then
|
||||
if [[ ! "$(ls -A /etc/ssh)" ]]; then
|
||||
cp -a "${CACHED_SSH_DIRECTORY}"/* /etc/ssh/.
|
||||
fi
|
||||
rm -rf "${CACHED_SSH_DIRECTORY}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user