From e526072a887a9690ea7893cc2f6157587fcf4084 Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Fri, 19 Dec 2025 21:13:28 -0600 Subject: [PATCH] update script to handle error in installation --- .../helm/qbittorrent/templates/config-map.yaml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/clusters/cl01tl/helm/qbittorrent/templates/config-map.yaml b/clusters/cl01tl/helm/qbittorrent/templates/config-map.yaml index e605e1be3..7c146797b 100644 --- a/clusters/cl01tl/helm/qbittorrent/templates/config-map.yaml +++ b/clusters/cl01tl/helm/qbittorrent/templates/config-map.yaml @@ -12,13 +12,25 @@ data: if ! command -v curl 2>&1 >/dev/null then echo "curl could not be found, installing"; - apk add curl; + apk add --no-cache curl; + if [ $? -eq 0 ]; then + echo ">> Installation successful" + else + echo ">> Installation failed with exit code $?" + exit 1 + fi fi; if ! command -v jq 2>&1 >/dev/null then echo "jq could not be found, installing"; - apk add jq; + apk add --no-cache jq; + if [ $? -eq 0 ]; then + echo ">> Installation successful" + else + echo ">> Installation failed with exit code $?" + exit 1 + fi fi; API_ENDPOINT="http://localhost:8080/api/v2";