Skip to content

Commit

Permalink
Merge pull request #2315 from openziti/fix-router-bootstrap-enroll-check
Browse files Browse the repository at this point in the history
qualify path to router identity
  • Loading branch information
qrkourier authored Aug 12, 2024
2 parents 2245f63 + 5eab063 commit 0ebd0a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dist/dist-packages/linux/openziti-router/bootstrap.bash
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ enroll() {
return 1
fi

if [[ ! -s "${ZITI_ROUTER_IDENTITY_CERT}" || "${1:-}" == --force ]]; then
if [[ ! -s "${ZITI_HOME}/${ZITI_ROUTER_IDENTITY_CERT}" || "${1:-}" == --force ]]; then
if [[ -n "${ZITI_ENROLL_TOKEN:-}" && ! -f "${ZITI_ENROLL_TOKEN}" ]]; then
# shellcheck disable=SC2188
ziti router enroll "${_config_file}" \
Expand Down Expand Up @@ -198,8 +198,8 @@ promptRouterAddress() {

promptEnrollToken() {
# do nothing if identity file has stuff in it
if [[ -s "${ZITI_ROUTER_IDENTITY_CERT}" ]]; then
echo "DEBUG: enrolled identity exists in ${ZITI_ROUTER_IDENTITY_CERT}" >&3
if [[ -s "${ZITI_HOME}/${ZITI_ROUTER_IDENTITY_CERT}" ]]; then
echo "DEBUG: not prompting for token because identity exists in ${ZITI_HOME}/${ZITI_ROUTER_IDENTITY_CERT}" >&3
# prompt for enrollment token if interactive, unless already answered
else
if ! [[ "${ZITI_BOOTSTRAP_ENROLLMENT:-}" == true ]]; then
Expand Down

0 comments on commit 0ebd0a8

Please sign in to comment.