22 lines
456 B
Plaintext
22 lines
456 B
Plaintext
#!/usr/bin/with-contenv bash
|
||
|
||
# make our folders
|
||
mkdir -p \
|
||
/config/qBittorrent \
|
||
/config/data
|
||
|
||
# copy config
|
||
[[ ! -e /config/qBittorrent/qBittorrent.conf ]] && \
|
||
cp /defaults/qBittorrent.conf /config/qBittorrent/qBittorrent.conf
|
||
|
||
# chown download directory if currently set to root
|
||
if [[ -d /downloads ]]; then
|
||
if [[ "$(stat -c '%U' /downloads)" != "abc" ]]; then
|
||
chown -R abc:abc /downloads
|
||
fi
|
||
fi
|
||
|
||
# permissions
|
||
chown -R abc:abc \
|
||
/config
|