mirror of
https://github.com/linuxserver/docker-qbittorrent.git
synced 2025-04-18 19:25:07 -04:00
21 lines
511 B
Text
Executable file
21 lines
511 B
Text
Executable file
#!/usr/bin/with-contenv bash
|
||
# shellcheck shell=bash
|
||
|
||
# make our folder
|
||
mkdir -p /config/qBittorrent
|
||
|
||
# copy default config
|
||
if [[ ! -f /config/qBittorrent/qBittorrent.conf ]]; then
|
||
cp /defaults/qBittorrent.conf /config/qBittorrent/qBittorrent.conf
|
||
fi
|
||
|
||
if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
|
||
# chown download directory if currently not set to abc
|
||
if grep -qe ' /downloads ' /proc/mounts; then
|
||
lsiown abc:abc /downloads
|
||
fi
|
||
|
||
# permissions
|
||
lsiown -R abc:abc \
|
||
/config
|
||
fi
|