From 879cc6db95fea9f80c2efdba97986eb09cabeec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tancr=C3=A8de?= Date: Sun, 22 Dec 2024 14:18:59 +0100 Subject: [PATCH] README : fix standalone mod (thks @earthly-alien) #17 + RUN : add debug infos --- README.md | 2 +- .../s6-rc.d/svc-mod-gluetun-sync-port/run | 32 ++++++++++++++++--- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0de548e..067e632 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ GSP_qbt_gtn_sync_port: image: ghcr.io/linuxserver/baseimage-alpine:edge container_name: GSP_qbt_gtn_sync_port environment: - - DOCKER_MODS=ghcr.io/t-anc/mod-qbittorrent-sync-port:main + - DOCKER_MODS=ghcr.io/t-anc/gsp-qbittorent-gluetun-sync-port-mod:main # Of course this is an API Key exemple, don't use this - GSP_GTN_API_KEY=yOdKVNFEA3/BSIWhPZohxppHd9I6bHiSJ network_mode: container:gluetun diff --git a/root/etc/s6-overlay/s6-rc.d/svc-mod-gluetun-sync-port/run b/root/etc/s6-overlay/s6-rc.d/svc-mod-gluetun-sync-port/run index 6e21994..d43b68e 100644 --- a/root/etc/s6-overlay/s6-rc.d/svc-mod-gluetun-sync-port/run +++ b/root/etc/s6-overlay/s6-rc.d/svc-mod-gluetun-sync-port/run @@ -42,6 +42,33 @@ log(){ echo "$(date +"%x %T") [GSP] - ${1}" } +if [ "${DEBUG,,}" = "true" ]; then + log "Debug mode enabled." + echo "\ ++---------------------------------------------------------+ +| Gluetun sync port (GSP) DEBUG INFO | +| Please anonymise credentials. | ++---------------------------------------------------------+ +| INPUT Variables : | ++---------------------------------------------------------+ +$(env | grep 'GSP') ++---------------------------------------------------------+ +| INTERNAL Variables : | ++---------------------------------------------------------+ +| MAX_SLEEP_TIME = ${MAX_SLEEP_TIME} +| RETRY_DELAY = ${RETRY_DELAY} +| INIT_RETRY_WAIT = ${INIT_RETRY_WAIT} +| GTN_PORT_INDEX = ${GTN_PORT_INDEX} +| GLUETUN = ${GLUETUN} +| QBITTORRENT = ${QBITTORRENT} +| QBT_USERNAME = ${QBT_USERNAME} +| QBT_PASSWORD (to be anonymised) = ${QBT_PASSWORD} +| GTN_API_KEY (to be anonymised) = ${GTN_API_KEY} ++---------------------------------------------------------+ +" + +fi + qbt_login(){ curl --fail --silent \ @@ -146,11 +173,6 @@ get_ports(){ } } -if [ "${DEBUG,,}" = "true" ]; then - log "Debug mode enabled." - set -x -fi - log "Waiting for Qbittorrent WebUI ..." curl --retry "${INIT_RETRY_WAIT}" --retry-all-errors --retry-delay 6 -s -o /dev/null "${QBITTORRENT}" || \