From ef4fb35c7fb3eea2587b3d07f135face141353ba Mon Sep 17 00:00:00 2001 From: MarkusMcNugen Date: Sat, 3 Feb 2018 08:05:08 -0500 Subject: [PATCH] Update start.sh --- qbittorrent/start.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/qbittorrent/start.sh b/qbittorrent/start.sh index 79d7cc6..1d1ee94 100644 --- a/qbittorrent/start.sh +++ b/qbittorrent/start.sh @@ -16,5 +16,15 @@ trap _handler SIGINT SIGTERM SIGHUP echo "[info] Starting qBittorrent daemon..." | ts '%Y-%m-%d %H:%M:%.S' /usr/bin/qbittorrent-nox --profile=/config & +while true; do + if [ -e /config/qBittorrent ]; then + chmod -R 755 /config/qBittorrent + chown -R 99:100 /config/qBittorrent + break + else + sleep 1 + fi +done + child=$(pgrep -o -x qbittorrent-nox) wait "$child"