Show correct value left/needs to be contributed for reactivating full bandwith and how much 'money' is left.

This commit is contained in:
frlan 2011-10-04 22:37:38 +02:00
parent 81f7ce99c9
commit 6e2d57610e

View file

@ -2,9 +2,15 @@
source $(dirname $0)/traffic_common.sh source $(dirname $0)/traffic_common.sh
balance=$((($TPer + $TEph - $TMax) / $BytesPerCent))
echo -e \ echo -e \
"Consumed: $((($TPer + $TEph) / 1024 / 1024)) MB "Consumed: $((($TPer + $TEph) / 1024 / 1024)) MB
($(($TPer / 1024 / 1024)) MB accounted to disk) ($(($TPer / 1024 / 1024)) MB accounted to disk)
Limit: $(($TMax / 1024 / 1024)) MB Limit: $(($TMax / 1024 / 1024)) MB"
Please donate $(($(($TPer + TEph)) / $BytesPerCent)) cent." if [ "$balance" -lt 0 ]; then
echo "There are $(($balance * -1 ))ct left"
else
echo "Please donate $balance cent."
fi