From 0cfa2af5008cd963602d3fad5b1c9576af93e8dd Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Wed, 17 Dec 2025 19:36:42 -0600 Subject: [PATCH] update script --- .../cl01tl/helm/qbittorrent/templates/config-map.yaml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/clusters/cl01tl/helm/qbittorrent/templates/config-map.yaml b/clusters/cl01tl/helm/qbittorrent/templates/config-map.yaml index 482d1cd76..7b682e068 100644 --- a/clusters/cl01tl/helm/qbittorrent/templates/config-map.yaml +++ b/clusters/cl01tl/helm/qbittorrent/templates/config-map.yaml @@ -43,12 +43,11 @@ data: fi PAYLOAD=$( jq -n \ - --arg random_port "true" \ - '{random_port: $random_port}' ); + '{random_port: true}' ); echo " "; echo ">> Setting port to random ..."; - HTTP_STATUS=$(curl -i -X POST --silent -b cookie -c cookie --write-out '%{http_code}' --output response_body_random.json --data "$PAYLOAD" "${API_ENDPOINT}/app/setPreferences"); + HTTP_STATUS=$(curl -i -X POST --silent -b cookie -c cookie --write-out '%{http_code}' --output response_body_random.json --data "json=$PAYLOAD" "${API_ENDPOINT}/app/setPreferences"); if [ "$HTTP_STATUS" == "200" ]; then echo ">> Random port set" @@ -63,12 +62,11 @@ data: sleep 5; PAYLOAD=$( jq -n \ - --arg listen_port "${1}" \ - '{listen_port: $listen_port}' ); + "{listen_port: ${1}}" ); 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 "$PAYLOAD" "${API_ENDPOINT}/app/setPreferences"; + 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"