File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424# check config-based ssl first
2525if [[ -n " $( juju config keystone ssl_cert) " ]]; then
2626 export OS_AUTH_PROTOCOL=https
27- elif (( $(jq - r '.applications[]| select(."charm- name"== "vault")' "$juju_status_json_cache " | wc - l)) ); then
27+ elif (( $(jq - r '( .applications // {}) []| select(."charm- name"== "vault")' "$juju_status_json_cache " | wc - l)) ); then
2828 # Vault-based ssl
29- if jq -r ' .applications.vault.relations.certificates[]' " $juju_status_json_cache " | grep -q keystone; then
29+ if jq -r ' ( .applications.vault.relations.certificates // []) []' " $juju_status_json_cache " | grep -q keystone; then
3030 readarray -t VAULT_STATUS < <( juju status vault --format=json | jq -r ' .applications.vault.units."vault/0"."workload-status" | .current,.message' )
3131 if [[ " ${VAULT_STATUS[0]} " == " blocked" && " ${VAULT_STATUS[1]} " == " Vault needs to be initialized" ]]; then
3232 read -p " $(
You can’t perform that action at this time.
0 commit comments