File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,16 @@ HEREDOC
115115 _info " Push certificates to server"
116116 export HTTPS_INSECURE=1
117117 export _H1=" Authorization: PBSAPIToken=${_proxmoxbs_header_api_token} "
118- _post " $_json_payload " " $_target_url " " " POST " application/json"
118+ response=$( _post " $_json_payload " " $_target_url " " " POST " application/json" )
119+ _retval=$?
120+ if [ " ${_retval} " -eq 0 ]; then
121+ _debug3 response " $response "
122+ _info " Certificate successfully deployed"
123+ return 0
124+ else
125+ _err " Certificate deployment failed"
126+ _debug " Response" " $response "
127+ return 1
128+ fi
119129
120130}
Original file line number Diff line number Diff line change @@ -127,6 +127,16 @@ HEREDOC
127127 _info " Push certificates to server"
128128 export HTTPS_INSECURE=1
129129 export _H1=" Authorization: PVEAPIToken=${_proxmoxve_header_api_token} "
130- _post " $_json_payload " " $_target_url " " " POST " application/json"
130+ response=$( _post " $_json_payload " " $_target_url " " " POST " application/json" )
131+ _retval=$?
132+ if [ " ${_retval} " -eq 0 ]; then
133+ _debug3 response " $response "
134+ _info " Certificate successfully deployed"
135+ return 0
136+ else
137+ _err " Certificate deployment failed"
138+ _debug " Response" " $response "
139+ return 1
140+ fi
131141
132142}
You can’t perform that action at this time.
0 commit comments