Files
infrastructure/clusters/cl01tl/manifests/qbittorrent/ConfigMap-glutun-update-script.yml

21 lines
589 B
YAML

---
# Source: qbittorrent/templates/config-map.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: glutun-update-script
namespace: qbittorrent
labels:
app.kubernetes.io/name: glutun-update-script
app.kubernetes.io/instance: qbittorrent
app.kubernetes.io/part-of: qbittorrent
data:
update.sh: |
if ! command -v curl 2>&1 >/dev/null
then
echo "curl could not be found, installing";
apk add curl;
fi;
echo "updating port with $1";
curl -i -X POST -d "json={\"listen_port\": \"${1}\"}" "http://localhost:8080/api/v2/app/setPreferences";