Skip to content

Commit

Permalink
fetch missing id
Browse files Browse the repository at this point in the history
If `registration_info.json` has no `id` field, fetch account information from CA
  • Loading branch information
makuk66 authored Jun 18, 2019
1 parent 74a536c commit 8bae8d2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dehydrated
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,8 @@ init_system() {
# Read account information or request from CA if missing
if [[ -e "${ACCOUNT_KEY_JSON}" ]]; then
ACCOUNT_ID="$(cat "${ACCOUNT_KEY_JSON}" | get_json_int_value id)"
fi
if [ -n "${ACCOUNT_ID:-}" ]; then
if [[ ${API} -eq 1 ]]; then
ACCOUNT_URL="${CA_REG}/${ACCOUNT_ID}"
else
Expand Down

0 comments on commit 8bae8d2

Please sign in to comment.