Advertisement
Guest User

Untitled

a guest
Jan 8th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #!/bin/bash
  2. # You can add a cron job for this little script
  3. SUBJECT='Gitlab Disk Space Monitoring'
  4. USED=$(df / | grep / | awk '{ print $5 }' | sed 's/%//g')
  5. RECIPIENTS='rec1@email.com, rec2@email.com, rec3@email.com'
  6.  
  7. sendmail "$RECIPIENTS" <<EOF
  8. subject: $SUBJECT: $USED%
  9. to: $RECIPIENTS
  10.  
  11. Your team have used $USED% of my disk space.
  12. EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement