From aeb6df232d829faa9ea855bda1d2819d4fd2e226 Mon Sep 17 00:00:00 2001 From: Steve Dodd Date: Thu, 6 Jul 2023 17:50:40 +0100 Subject: [PATCH] Check the disk usage of the filesystem hosting the processed recordings, not necessarily the root filesystem --- scripts/disk_check.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/disk_check.sh b/scripts/disk_check.sh index 27fef21..c6c98d8 100755 --- a/scripts/disk_check.sh +++ b/scripts/disk_check.sh @@ -1,9 +1,10 @@ #!/usr/bin/env bash set -x -used="$(df -h / | tail -n1 | awk '{print $5}')" + +source /etc/birdnet/birdnet.conf +used="$(df -h ${EXTRACTED} | tail -n1 | awk '{print $5}')" if [ "${used//%}" -ge 95 ]; then - source /etc/birdnet/birdnet.conf case $FULL_DISK in purge) echo "Removing oldest data"