MOVED TO https://github.com/GAS85/cubietruck
I create a script that will try to send Warning Email and and shutdown the system as soon as it goes below 10%.
I put it in cron hourly and script should automatically check and do loop if battery discharging and below e.g. 80%.
E-Mail is needed because last time I did not know that my power supply died and I did not know why sever stopped. This version is also producing logs that could be checked after cubietruck fails. That helps for trouble shooting, e.g. to find out that power supply could not produce enough current to charge battery.
Log output example: