File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -532,14 +532,19 @@ spec:
532
532
533
533
my_host=$(hostname -f)
534
534
535
+ HTTP_PROTOCOL="http"
536
+ HTTPS_OPTION=""
537
+ if [[ "$MARKLOGIC_JOIN_TLS_ENABLED" == "true" ]]; then
538
+ HTTP_PROTOCOL="https"
539
+ HTTPS_OPTION="-k"
540
+ fi
535
541
log "Info: [prestop] MarkLogic Pod Hostname: "$my_host
536
-
537
542
for ((i = 0; i < 5; i = i + 1)); do
538
543
res_code=$(curl --anyauth --user $MARKLOGIC_ADMIN_USERNAME:$MARKLOGIC_ADMIN_PASSWORD \
539
544
-o /dev/null -m 10 -s -w %{http_code} \
540
- -i -X POST --data "state=shutdown&failover=true" \
545
+ -i -X POST ${HTTPS_OPTION} --data "state=shutdown&failover=true" \
541
546
-H "Content-type: application/x-www-form-urlencoded" \
542
- http ://localhost:8002/manage/v2/hosts/$my_host?format=json)
547
+ ${HTTP_PROTOCOL} ://localhost:8002/manage/v2/hosts/$my_host?format=json)
543
548
544
549
if [[ ${res_code} -eq 202 ]]; then
545
550
log "Info: [prestop] Host shut down response code: "$res_code
You can’t perform that action at this time.
0 commit comments