I am using Debian wheezy. My problem is, I am using a limited 2.5 GB net connection and would like to capture my usage before shutting down. My idea is simply running a script as:
#!/bin/bash date >> ~/mydatausage.txt ifconfig -a >> ~/mydatausage.txt
at the time of shutdown.
How can I run this script at shutdown, as root?