Don't try and chown non-existent directory

This commit is contained in:
TheSpad
2021-04-26 13:29:20 +01:00
parent d885e13383
commit 3120dca15e

View File

@@ -10,8 +10,10 @@ mkdir -p \
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
if [[ -d /downloads ]]; then
if [[ "$(stat -c '%U' /downloads)" != "abc" ]]; then
chown -R abc:abc /downloads
fi
fi
# permissions