root 336 B

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