-
-
Save tushar-borole/83e0d9d2204f86eb0849 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ax=`vnstat --oneline | awk -F ";" '{print $11}'` | |
| if [[ "$ax" == *GiB* ]]; | |
| then | |
| if [ $(echo "$(echo "$ax" | sed 's/ GiB//g') > 999"|bc) -eq 1 ] | |
| then | |
| shutdown -h now | |
| fi | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment