forked from TrueCloudLab/certificates
Only pass --admin-subject if --remote-management is true; fix overall boolean handling
This commit is contained in:
parent
e4073270f3
commit
2ab9483952
1 changed files with 7 additions and 6 deletions
|
@ -43,7 +43,6 @@ function step_ca_init () {
|
||||||
--provisioner "${DOCKER_STEPCA_INIT_PROVISIONER_NAME}"
|
--provisioner "${DOCKER_STEPCA_INIT_PROVISIONER_NAME}"
|
||||||
--password-file "${STEPPATH}/password"
|
--password-file "${STEPPATH}/password"
|
||||||
--provisioner-password-file "${STEPPATH}/provisioner_password"
|
--provisioner-password-file "${STEPPATH}/provisioner_password"
|
||||||
--admin-subject "${DOCKER_STEPCA_INIT_ADMIN_SUBJECT}"
|
|
||||||
--address ":9000"
|
--address ":9000"
|
||||||
)
|
)
|
||||||
if [ -n "${DOCKER_STEPCA_INIT_PASSWORD}" ]; then
|
if [ -n "${DOCKER_STEPCA_INIT_PASSWORD}" ]; then
|
||||||
|
@ -53,18 +52,20 @@ function step_ca_init () {
|
||||||
generate_password > "${STEPPATH}/password"
|
generate_password > "${STEPPATH}/password"
|
||||||
generate_password > "${STEPPATH}/provisioner_password"
|
generate_password > "${STEPPATH}/provisioner_password"
|
||||||
fi
|
fi
|
||||||
if [ -n "${DOCKER_STEPCA_INIT_SSH}" ]; then
|
if [ "${DOCKER_STEPCA_INIT_SSH}" == "true" ]; then
|
||||||
setup_args=("${setup_args[@]}" --ssh)
|
setup_args=("${setup_args[@]}" --ssh)
|
||||||
fi
|
fi
|
||||||
if [ -n "${DOCKER_STEPCA_INIT_ACME}" ]; then
|
if [ "${DOCKER_STEPCA_INIT_ACME}" == "true" ]; then
|
||||||
setup_args=("${setup_args[@]}" --acme)
|
setup_args=("${setup_args[@]}" --acme)
|
||||||
fi
|
fi
|
||||||
if [ -n "${DOCKER_STEPCA_INIT_REMOTE_MANAGEMENT}" ]; then
|
if [ "${DOCKER_STEPCA_INIT_REMOTE_MANAGEMENT}" == "true" ]; then
|
||||||
setup_args=("${setup_args[@]}" --remote-management)
|
setup_args=("${setup_args[@]}" --remote-management
|
||||||
|
--admin-subject "${DOCKER_STEPCA_INIT_ADMIN_SUBJECT}"
|
||||||
|
)
|
||||||
fi
|
fi
|
||||||
step ca init "${setup_args[@]}"
|
step ca init "${setup_args[@]}"
|
||||||
echo ""
|
echo ""
|
||||||
if [ -n "${DOCKER_STEPCA_INIT_REMOTE_MANAGEMENT}" ]; then
|
if [ "${DOCKER_STEPCA_INIT_REMOTE_MANAGEMENT}" == "true" ]; then
|
||||||
echo "👉 Your CA administrative username is: ${DOCKER_STEPCA_INIT_ADMIN_SUBJECT}"
|
echo "👉 Your CA administrative username is: ${DOCKER_STEPCA_INIT_ADMIN_SUBJECT}"
|
||||||
fi
|
fi
|
||||||
echo "👉 Your CA administrative password is: $(< $STEPPATH/provisioner_password )"
|
echo "👉 Your CA administrative password is: $(< $STEPPATH/provisioner_password )"
|
||||||
|
|
Loading…
Reference in a new issue