Show correct value left/needs to be contributed for reactivating full bandwith and how much 'money' is left.
This commit is contained in:
parent
81f7ce99c9
commit
6e2d57610e
1 changed files with 8 additions and 2 deletions
|
@ -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
|
||||||
|
|
Reference in a new issue