- update_access_token="$(_make_access_token "$update_path")"
- _debug update_access_token "$update_access_token"
- export _H1="Authorization: QBox $update_access_token"
- update_response=$(_post "$update_body" "$QINIU_API_BASE$update_path" 0 "PUT" "application/json" | _dbase64 "multiline")
-
- if _contains "$update_response" "error"; then
- _err "Error in updating domain httpsconf:"
- _err "$update_response"
- return 1
- fi
-
- _debug update_response "$update_response"
- _info "Certificate successfully deployed"
+ for domain in $QINIU_CDN_DOMAIN; do
+ update_path="/domain/$domain/httpsconf"
+ update_access_token="$(_make_access_token "$update_path")"
+ _debug update_access_token "$update_access_token"
+ export _H1="Authorization: QBox $update_access_token"
+ update_response=$(_post "$update_body" "$QINIU_API_BASE$update_path" 0 "PUT" "application/json" | _dbase64)
+
+ if _contains "$update_response" "error"; then
+ _err "Error in updating domain $domain httpsconf:"
+ _err "$update_response"
+ return 1
+ fi
+
+ _debug update_response "$update_response"
+ _info "Domain $domain certificate has been deployed successfully"
+ done