Advertisement
murdanieko

Bandwidth Exceeded Server Auto-Shutdown

Nov 16th, 2015
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.20 KB | None | 0 0
  1. #!/bin/bash
  2. ax=`vnstat --oneline | awk -F ";" '{print $11}'`
  3. if [[ "$ax" == *GiB* ]]
  4. then
  5.     if [ $(echo "$(echo "$ax" | sed 's/ GiB//g') > 900"|bc) -eq 1 ]
  6.     then
  7.       shutdown -h now
  8.     fi
  9. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement