feat: added drive_check.sh

This commit is contained in:
root 2025-04-24 18:24:35 +02:00
parent ab97aa8f70
commit 30542cc266

12
drive_check.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
line=$(df | grep /mnt/content)
value=$(echo "$line" | sed -n 's/.*\b\([0-9]\{1,3\}\)%.*/\1/p')
if [ "$value" -gt 95 ]; then
echo "Wert ist kritisch! Sende notification"
curl -X POST -H "Content-Type: application/json" 'http://192.168.111.107:8080/v2/send' -d "{\"message\": \"Content Speicherverbrauch ist bei ${value}%!\", \"number\": \"+491775923370\", \"recipients\": [ \"+491775923370\" ]}"
else
echo "Wert ist unkritisch."
fi