From 2e2d9c36ba2902a4c2171ba0e0f633ed7da8353c Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Wed, 25 Sep 2013 17:55:40 +0200 Subject: [PATCH] single line curl call to process stat-day.php --- web/briskin5/stat-day.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/briskin5/stat-day.php b/web/briskin5/stat-day.php index 04d2cbc..d21e369 100644 --- a/web/briskin5/stat-day.php +++ b/web/briskin5/stat-day.php @@ -29,12 +29,12 @@ wget -O daily.txt dodo.birds.van/brisk/briskin5/stat-day.php?pazz=yourpasswd&fro now="$(date +%s)" # from 100 days ago to 1 day after -to="$(date +"%Y-%m-%d+%H:%M:%S" -d @$(echo "$now + 86400" | bc))" -from="$(date +"%Y-%m-%d+%H:%M:%S" -d @$(echo "$now - 8640000" | bc))" +to="$(date +"%Y-%m-%d+%H:%M:%S" -d @$(echo "$(date +%s) + 86400" | bc))" +from="$(date +"%Y-%m-%d+%H:%M:%S" -d @$(echo "$(date +%s) - 8640000" | bc))" # to="$(date +"%Y-%m-%d+%H:%M:%S" -d @$(echo "$now + 7200 " | bc))" # from="$(date +"%Y-%m-%d+%H:%M:%S" -d @$(echo "$now - 9200 " | bc))" -curl -d "pazz=$BRISK_PASS" "http://$BRISK_SITE/briskin5/stat-day.php?from=$from&to=$to" +curl -d "pazz=$BRISK_PASS" "http://$BRISK_SITE/briskin5/stat-day.php?from=$(date +"%Y-%m-%d+%H:%M:%S" -d @$(echo "$(date +%s) - 8640000" | bc))&to=$(date +"%Y-%m-%d+%H:%M:%S" -d @$(echo "$(date +%s) + 86400" | bc))" */ -- 2.17.1