tushariscoolster
6/13/2015 - 9:54 PM

do-bandwidth-shutdown

#!/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