Don't chown /downloads unless it's mounted

This commit is contained in:
thespad
2024-07-03 19:17:09 +01:00
parent 3841f98110
commit 005e8e0501
5 changed files with 11 additions and 9 deletions

View File

@@ -10,10 +10,8 @@ if [[ ! -f /config/qBittorrent/qBittorrent.conf ]]; then
fi
# chown download directory if currently not set to abc
if [[ -d /downloads ]]; then
if [[ "$(stat -c '%U' /downloads)" != "abc" ]]; then
lsiown -R abc:abc /downloads
fi
if grep -qe ' /downloads ' /proc/mounts; then
lsiown abc:abc /downloads
fi
# permissions