View Single Post
EmaNymton's Avatar
Posts: 141 | Thanked: 267 times | Joined on May 2010 @ Germany
#448
Originally Posted by herno24 View Post
Ok, for gprs i think we need a script (i don't know how to do it) to reset the counter automatically every month. What do you think about this?.
Use the script with profilematic to check everyday if it's the day to reset. Not fully tested, before using it see your values with
Code:
gconftool-2 -R /cellui/settings/datacounter
and save it somewhere so you can manually recover.

Code:
#!/bin/sh
# reset the data counter on a selected reset day

reset_day="05" # change to your needs
day_of_month=$(date +"%d")
datetime=$(date +"%d.%m.%Y.%s")

if [ $reset_day = $day_of_month ]
then
gconftool -s --type string /cellui/settings/datacounter/transfer/gprs_home_tx_bytes "0"
gconftool -s --type string /cellui/settings/datacounter/transfer/gprs_home_rx_bytes "0"
gconftool -s --type string /cellui/settings/datacounter/general/gprs_home_last_reset $datetime
fi
 

The Following 2 Users Say Thank You to EmaNymton For This Useful Post: