Skip to content

Commit

Permalink
README : fix standalone mod (thks @earthly-alien) #17 + RUN : add deb…
Browse files Browse the repository at this point in the history
…ug infos
  • Loading branch information
t-anc committed Dec 22, 2024
1 parent 4755f39 commit 879cc6d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
32 changes: 27 additions & 5 deletions root/etc/s6-overlay/s6-rc.d/svc-mod-gluetun-sync-port/run
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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}" || \
Expand Down

0 comments on commit 879cc6d

Please sign in to comment.