Renamed health services

This commit is contained in:
2023-11-16 15:32:29 +01:00
parent 04f69aefde
commit d9d6c8060a
47 changed files with 162 additions and 162 deletions

View File

@@ -0,0 +1,15 @@
#!/bin/sh
# @param $1 mimimum free disc space
errors=0
minimum_percent_free_disc_space="$1"
echo "checking disc space use..."
df
for disc_use_percent in $(df --output=pcent | sed 1d)
do
disc_use_percent_number=$(echo "$disc_use_percent" | sed "s/%//")
if [ "$disc_use_percent_number" -gt "$minimum_percent_free_disc_space" ]; then
echo "WARNING: $disc_use_percent_number exceeds the limit of $minimum_percent_free_disc_space%."
errors+=1;
fi
done
exit $errors;