Check the disk usage of the filesystem hosting the processed

recordings, not necessarily the root filesystem
This commit is contained in:
Steve Dodd
2023-07-06 17:50:40 +01:00
parent c85fa1e928
commit aeb6df232d
+3 -2
View File
@@ -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"