From 2bbec40d33fda2d771465401f6bb9374e0c32ec0 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Mon, 26 Apr 2021 13:28:49 +0100 Subject: [PATCH] Don't try and chown non-existent directory --- root/etc/cont-init.d/30-config | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/root/etc/cont-init.d/30-config b/root/etc/cont-init.d/30-config index b75ba04..b4f96e2 100644 --- a/root/etc/cont-init.d/30-config +++ b/root/etc/cont-init.d/30-config @@ -15,8 +15,10 @@ mkdir -p /config/qBittorrent mv /config/data/qBittorrent/BT_backup/ /config/data/qBittorrent/BT_backup.old/ # chown download directory if currently not set to abc -if [[ "$(stat -c '%U' /downloads)" != "abc" ]]; then - chown -R abc:abc /downloads +if [[ -d /downloads ]]; then + if [[ "$(stat -c '%U' /downloads)" != "abc" ]]; then + chown -R abc:abc /downloads + fi fi # permissions