mirror of
https://github.com/linuxserver/docker-qbittorrent.git
synced 2025-06-28 01:12:24 -04:00
Don't chown /downloads unless it's mounted
This commit is contained in:
parent
3841f98110
commit
005e8e0501
5 changed files with 11 additions and 9 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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" }
|
||||
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue