Skip to content

Commit

Permalink
Merge pull request #314 from linuxserver/master-ro-tweaks
Browse files Browse the repository at this point in the history
Don't chown /downloads unless it's mounted (master)
  • Loading branch information
Roxedus authored Jul 8, 2024
2 parents 4fe6aac + 005e8e0 commit ac6dc10
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
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

0 comments on commit ac6dc10

Please sign in to comment.