From a9b5c12035cce40c7684caaab6a8960b3fcc3331 Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Wed, 17 Dec 2025 19:53:10 -0600 Subject: [PATCH] capture status code --- clusters/cl01tl/helm/qbittorrent/templates/config-map.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clusters/cl01tl/helm/qbittorrent/templates/config-map.yaml b/clusters/cl01tl/helm/qbittorrent/templates/config-map.yaml index 7b682e068..330679cf5 100644 --- a/clusters/cl01tl/helm/qbittorrent/templates/config-map.yaml +++ b/clusters/cl01tl/helm/qbittorrent/templates/config-map.yaml @@ -66,7 +66,7 @@ data: echo " "; echo ">> Updating port with ${1} ..."; - curl -i -X POST --silent -b cookie -c cookie --write-out '%{http_code}' --output response_body_update.json --data "json=$PAYLOAD" "${API_ENDPOINT}/app/setPreferences"; + HTTP_STATUS=$(curl -i -X POST --silent -b cookie -c cookie --write-out '%{http_code}' --output response_body_update.json --data "json=$PAYLOAD" "${API_ENDPOINT}/app/setPreferences"); if [ "$HTTP_STATUS" == "200" ]; then echo ">> Port set" @@ -82,7 +82,7 @@ data: echo " "; echo ">> Qbittorrent's post is now:"; - curl -i -X GET --silent -b cookie -c cookie --write-out '%{http_code}' --output response_body_check.json "${API_ENDPOINT}/app/preferences"; + HTTP_STATUS=$(curl -i -X GET --silent -b cookie -c cookie --write-out '%{http_code}' --output response_body_check.json "${API_ENDPOINT}/app/preferences"); LISTEN_PORT=$(cat response_body_check.json | jq -r .listen_port)