27 lines
798 B
Plaintext
27 lines
798 B
Plaintext
#!/usr/bin/with-contenv bash
|
||
|
||
# make our folder
|
||
mkdir -p /config/qBittorrent
|
||
|
||
# copy config
|
||
[[ ! -e /config/qBittorrent/qBittorrent.conf ]] && \
|
||
cp /defaults/qBittorrent.conf /config/qBittorrent/qBittorrent.conf
|
||
|
||
# v4.3.3 BT_backup migration
|
||
[[ -d /config/data/qBittorrent/BT_backup/ ]] && \
|
||
mv /config/qBittorrent/BT_backup/ /config/qBittorrent/BT_backup.bak/ && \
|
||
mkdir /config/qBittorrent/BT_backup/ && \
|
||
cp -a /config/data/qBittorrent/BT_backup/. /config/qBittorrent/BT_backup/ && \
|
||
mv /config/data/qBittorrent/BT_backup/ /config/data/qBittorrent/BT_backup.old/
|
||
|
||
# chown download directory if currently not set to abc
|
||
if [[ -d /downloads ]]; then
|
||
if [[ "$(stat -c '%U' /downloads)" != "abc" ]]; then
|
||
chown -R abc:abc /downloads
|
||
fi
|
||
fi
|
||
|
||
# permissions
|
||
chown -R abc:abc \
|
||
/config
|