Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't chown /downloads unless it's mounted (master) #314

Merged
merged 1 commit into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

FROM ghcr.io/linuxserver/unrar:latest as unrar
FROM ghcr.io/linuxserver/unrar:latest AS unrar

FROM ghcr.io/linuxserver/baseimage-alpine:edge

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

FROM ghcr.io/linuxserver/unrar:arm64v8-latest as unrar
FROM ghcr.io/linuxserver/unrar:arm64v8-latest AS unrar

FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-edge

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ services:
- TORRENTING_PORT=6881
volumes:
- /path/to/qbittorrent/appdata:/config
- /path/to/downloads:/downloads
- /path/to/downloads:/downloads #optional
ports:
- 8080:8080
- 6881:6881
Expand All @@ -128,7 +128,7 @@ docker run -d \
-p 6881:6881 \
-p 6881:6881/udp \
-v /path/to/qbittorrent/appdata:/config \
-v /path/to/downloads:/downloads \
-v /path/to/downloads:/downloads `#optional` \
--restart unless-stopped \
lscr.io/linuxserver/qbittorrent:latest
```
Expand Down
6 changes: 5 additions & 1 deletion readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ param_container_name: "{{ project_name }}"
param_usage_include_vols: true
param_volumes:
- { vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/appdata", desc: "Contains all relevant configuration files." }
- { vol_path: "/downloads", vol_host_path: "/path/to/downloads", desc: "Location of downloads on disk." }
param_usage_include_ports: true
param_ports:
- { external_port: "8080", internal_port: "8080", port_desc: "WebUI" }
Expand All @@ -34,6 +33,11 @@ param_usage_include_env: true
param_env_vars:
- { env_var: "WEBUI_PORT", env_value: "8080", desc: "for changing the port of the web UI, see below for explanation"}
- { env_var: "TORRENTING_PORT", env_value: "6881", desc: "for changing the port of tcp/udp connection, see below for explanation" }
opt_param_usage_include_vols: true
opt_param_volumes:
- { vol_path: "/downloads", vol_host_path: "/path/to/downloads", desc: "Location of downloads on disk." }

readonly_supported: true

# application setup block
app_setup_block_enabled: true
Expand Down
6 changes: 2 additions & 4 deletions root/etc/s6-overlay/s6-rc.d/init-qbittorrent-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ if [[ ! -f /config/qBittorrent/qBittorrent.conf ]]; then
fi

# chown download directory if currently not set to abc
if [[ -d /downloads ]]; then
if [[ "$(stat -c '%U' /downloads)" != "abc" ]]; then
lsiown -R abc:abc /downloads
fi
if grep -qe ' /downloads ' /proc/mounts; then
lsiown abc:abc /downloads
fi

# permissions
Expand Down