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
|
fi
|
||||||
|
|
||||||
# initiate default sshd-config if there is none available
|
# 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/.
|
cp -a "${CACHED_SSH_DIRECTORY}"/* /etc/ssh/.
|
||||||
fi
|
fi
|
||||||
rm -rf "${CACHED_SSH_DIRECTORY}"
|
rm -rf "${CACHED_SSH_DIRECTORY}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user