add scripts to manage minutes and statistics
[brisk.git] / bin / brisk_explain_update.sh
1 #!/bin/bash
2 set -x
3 export PATH=/home/nastasi/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
4 B_HOSTNAME="http://localhost/brisk"
5 # now="$(date -d '2014-01-21 23:56:00' +%s)"
6 now="$(date +%s)"
7
8 to="$(date +"%Y-%m-%d+%H:%M:%S" -d @$(echo "($now / 86400) * 86400 + 7200 " | bc))"
9 from="$(date +"%Y-%m-%d+%H:%M:%S" -d @$(echo "($now / 86400) * 86400 + 7200 - (86400)" | bc))"
10 # to="$(date +"%Y-%m-%d+%H:%M:%S" -d @$(echo "$now + 7200 " | bc))"
11 # from="$(date +"%Y-%m-%d+%H:%M:%S" -d @$(echo "$now - 9200 " | bc))"
12
13 curl -d 'pazz=yourpasswd' "$B_HOSTNAME/briskin5/stat-day.php?from=$from&to=$to"