feat: Support ecryptfs filesystem

This commit is contained in:
Kroese 2024-04-26 05:56:06 +02:00 committed by GitHub
parent 277c0946ac
commit 94930b265b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,8 +58,15 @@ if [ ! -d "$STORAGE" ]; then
error "Storage folder ($STORAGE) not found!" && exit 13 error "Storage folder ($STORAGE) not found!" && exit 13
fi fi
# Print system info # Check filesystem
FS=$(stat -f -c %T "$STORAGE") FS=$(stat -f -c %T "$STORAGE")
if [[ "${FS,,}" == "ecryptfs" ]] || [[ "${FS,,}" == "tmpfs" ]]; then
DISK_IO="threads"
DISK_CACHE="writeback"
fi
# Print system info
FS="${FS/ext2\/ext3/ext4}"; FS="${FS/ext2\/ext3/ext4}";
SPACE=$(df --output=avail -B 1 "$STORAGE" | tail -n 1) SPACE=$(df --output=avail -B 1 "$STORAGE" | tail -n 1)
SPACE_GB=$(( (SPACE + 1073741823)/1073741824 )) SPACE_GB=$(( (SPACE + 1073741823)/1073741824 ))