Add newline to password file for readabiliy

pull/678/head
Carl Tashian 3 years ago
parent bc63829111
commit 4e8e4c638e

@ -32,6 +32,7 @@ function init_if_possible () {
function generate_password () { function generate_password () {
set +o pipefail set +o pipefail
< /dev/urandom tr -dc A-Za-z0-9 | head -c40 < /dev/urandom tr -dc A-Za-z0-9 | head -c40
echo
set -o pipefail set -o pipefail
} }
@ -45,7 +46,7 @@ function step_ca_init () {
--address ":9000" --address ":9000"
) )
if [ -n "${DOCKER_STEPCA_INIT_PASSWORD}" ]; then if [ -n "${DOCKER_STEPCA_INIT_PASSWORD}" ]; then
echo -n "${DOCKER_STEPCA_INIT_PASSWORD}" > "${STEPPATH}/password" echo "${DOCKER_STEPCA_INIT_PASSWORD}" > "${STEPPATH}/password"
else else
generate_password > "${STEPPATH}/password" generate_password > "${STEPPATH}/password"
fi fi

Loading…
Cancel
Save