From 4e8e4c638ecc6ee2437a43a5fc7e3b5b3821deb4 Mon Sep 17 00:00:00 2001 From: Carl Tashian Date: Wed, 18 Aug 2021 12:50:14 -0700 Subject: [PATCH] Add newline to password file for readabiliy --- docker/entrypoint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index a6d29768..eb764bd4 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -32,6 +32,7 @@ function init_if_possible () { function generate_password () { set +o pipefail < /dev/urandom tr -dc A-Za-z0-9 | head -c40 + echo set -o pipefail } @@ -45,7 +46,7 @@ function step_ca_init () { --address ":9000" ) if [ -n "${DOCKER_STEPCA_INIT_PASSWORD}" ]; then - echo -n "${DOCKER_STEPCA_INIT_PASSWORD}" > "${STEPPATH}/password" + echo "${DOCKER_STEPCA_INIT_PASSWORD}" > "${STEPPATH}/password" else generate_password > "${STEPPATH}/password" fi