First release
This commit is contained in:
12
entrypoint.sh
Executable file
12
entrypoint.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
# generate host keys if not present
|
||||
ssh-keygen -A
|
||||
|
||||
# check wether a random root-password is provided
|
||||
if [ ! -z ${ROOT_PASSWORD} ] && [ "${ROOT_PASSWORD}" != "root" ]; then
|
||||
echo "root:${ROOT_PASSWORD}" | chpasswd
|
||||
fi
|
||||
|
||||
# do not detach (-D), log to stderr (-e), passthrough other arguments
|
||||
exec /usr/sbin/sshd -D -e "$@"
|
||||
Reference in New Issue
Block a user