From a0ffb0ab9c36c0a753dfc7827a3250c37973eb3d Mon Sep 17 00:00:00 2001 From: Dennis Hermsmeier Date: Thu, 20 Jun 2019 09:42:21 +0200 Subject: [PATCH] fix check for empty sshd dir --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 569e57c..053540d 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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}"