fix check for empty sshd dir

This commit is contained in:
Dennis Hermsmeier 2019-06-20 09:42:21 +02:00
parent cfabbd0a68
commit a0ffb0ab9c

View File

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