Skip to content

Commit

Permalink
Add link to readme + message init checks OK
Browse files Browse the repository at this point in the history
  • Loading branch information
t-anc committed Apr 10, 2024
1 parent 75699be commit 8a830f4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This mod is to be used with [linuxserver/qbittorrent container](https://github.c
## Install

Follow the instructions [here](https://docs.linuxserver.io/general/container-customization/#docker-mods).
With the following link for the mod [ghcr.io/TODO](https://ghcr.io/TODO).
With the following link for the mod `ghcr.io/t-anc/gsp-qbittorent-gluetun-sync-port-mod:main`.

- You will need to enable `Bypass authentication for clients on localhost` inside qbittorrent's `settings` > `Web UI`. (Authentication method not implemented yet)
- If you have enabled the `Enable Host header validation` option, you will need to add `localhost` to the `Server domains` list.
Expand Down Expand Up @@ -53,7 +53,7 @@ services:
environment:
- TZ=Europe/Paris
- WEBUI_PORT=8080
- DOCKER_MODS=ghcr.io/TODO
- DOCKER_MODS=ghcr.io/t-anc/gsp-qbittorent-gluetun-sync-port-mod:main
- GSP_SLEEP=120
- GSP_MINIMAL_LOGS=false
volumes:
Expand All @@ -80,10 +80,10 @@ docker logs -f qbittorrent

```log
[mod-init] Running Docker Modification Logic
[mod-init] Adding TODO to container
[mod-init] Downloading TODO from ghcr.io
[mod-init] Installing TODO
[mod-init] TODO applied to container
[mod-init] Adding t-anc/gsp-qbittorent-gluetun-sync-port-mod:main to container
[mod-init] Downloading t-anc/gsp-qbittorent-gluetun-sync-port-mod:main from ghcr.io
[mod-init] Installing t-anc/gsp-qbittorent-gluetun-sync-port-mod:main
[mod-init] t-anc/gsp-qbittorent-gluetun-sync-port-mod:main applied to container
[migrations] started
[migrations] no migrations found
usermod: no changes
Expand Down
15 changes: 9 additions & 6 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 @@ -45,14 +45,17 @@ init_checks(){

if [ "$(curl --write-out '%{http_code}' --silent --output /dev/null "${QBITTORRENT}")" -eq 401 ]; then
err='true'
log "${MSG_prefix} Qbittorrent returned 401. Is the \"Enable Host header validation\" setting set ? And is ${QBITTORRENT} whitelisted ?"
log "${MSG_prefix} Qbittorrent returned 401. Is the \"Enable Host header validation\" setting set ? Is ${QBITTORRENT} whitelisted ?"
fi

if [ -n "${err}" ] && [ "${GSP_SKIP_INIT_CHECKS,,}" != 'true' ];then
log "Init checks failed, exiting the mod. You can disable init checks by setting \"GSP_SKIP_INIT_CHECKS=true\""
while :; do
sleep 3600
done
if [ "${GSP_SKIP_INIT_CHECKS,,}" != 'true' ]; then
if [ -n "${err}" ];then
log "Init checks failed, exiting the mod. You can disable init checks by setting \"GSP_SKIP_INIT_CHECKS=true\"."
while :; do
sleep 3600
done
else
log "Init checks passed."
fi
}

Expand Down

0 comments on commit 8a830f4

Please sign in to comment.