docker-qbittorrent/root/etc/s6-overlay/s6-rc.d/init-qbittorrent-config/run
2024-12-20 20:20:49 +00:00

21 lines
511 B
Text
Executable file
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/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