#!/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 [[ "$(stat -c '%U' /downloads)" != "abc" ]]; then chown -R abc:abc /downloads fi # permissions chown -R abc:abc \ /config