- #!/bin/bash
- source config.sh
- CURRENT=$(df / | grep / | awk '{ print $5}' | sed 's/%//g')
- THRESHOLD=90
- if [ "$CURRENT" -gt "$THRESHOLD" ] ; then
- echo """
- hi
- i'm clara. a server Manager bot
- Your root partition remaining free space is critically low. Used: $CURRENT%
- """ | mutt -s "root partition free space is critically low" $email
- fi
|