🚑 qbittorrent-upgrade-p2pblocklist

This commit is contained in:
auricom
2022-12-03 00:11:26 +01:00
parent 3d4638f265
commit 10fd65e6d9

View File

@@ -53,17 +53,17 @@ spec:
set -o errexit set -o errexit
set -o nounset set -o nounset
curl --location https://github.com/DavidMoore/ipfilter/releases/download/lists/ipfilter.dat.gz --output /tmp/ipfilter.dat.gz curl --silent --location https://github.com/DavidMoore/ipfilter/releases/download/lists/ipfilter.dat.gz --output /tmp/ipfilter.dat.gz
gunzip /tmp/ipfilter.dat.gz gunzip /tmp/ipfilter.dat.gz
result=$(kubectl get pod --selector app.kubernetes.io/name=qbittorrent --output custom-columns=:metadata.name --namespace default) result=$(kubectl get pod --selector app.kubernetes.io/name=qbittorrent --output custom-columns=:metadata.name --namespace default)
QBITTORRENT_POD=$(echo $result | awk '{ print $NF }') QBITTORRENT_POD=$(echo $result | awk '{ print $NF }')
echo $QBITTORRENT_POD | grep qbittorrent if [[ $QBITTORRENT_POD == *"qbittorrent"* ]]; then
if [[ $(echo $QBITTORRENT_POD | grep qbittorrent) ]]; then
kubectl cp /tmp/ipfilter.dat default/$QBITTORRENT_POD:/config/ipfilter.dat kubectl cp /tmp/ipfilter.dat default/$QBITTORRENT_POD:/config/ipfilter.dat
kubectl rollout restart deployment qbittorrent --namespace default && curl -m 10 --retry 5 https://uptime-kuma.${SECRET_CLUSTER_DOMAIN}/api/push/6RUDha9bDp?status=up&msg=OK&ping= kubectl rollout restart deployment qbittorrent --namespace default
curl http://uptime-kuma.default.svc.cluster.local.:3001/api/push/6RUDha9bDp?status=up&msg=OK&ping=
sleep 5
else else
echo "qbittorrent deployment not found" echo "qbittorrent deployment not found"
exit 1 exit 1
fi fi
curl -fsS -m 10 --retry 5 -o /dev/null https://uptime-kuma.k3s.xpander.ovh/api/push/6RUDha9bDp?status=up&msg=OK&ping=
restartPolicy: Never restartPolicy: Never