From d7917ef7de81b54f28d3f94a4d2f85ef4684eca4 Mon Sep 17 00:00:00 2001
From: tianyu <xdtianyu@gmail.com>
Date: Mon, 7 Sep 2015 19:57:59 +0800
Subject: [PATCH] fix url

---
 speedtest/speedtest.sh | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/speedtest/speedtest.sh b/speedtest/speedtest.sh
index ff37c92..c595d10 100755
--- a/speedtest/speedtest.sh
+++ b/speedtest/speedtest.sh
@@ -1,10 +1,12 @@
 #!/bin/bash
 
 EMAIL="YOUR_EMAIL@example.com"
-TIMEOUT=20
+TIMEOUT=15
 NAME="speedtest"
 EVENT="finished"
 OUTPUT=/tmp/wget.speedtest
+SPEED_URL=https://example.com/speed.php
+MAIL_URL=https://example.com/mail_extra.php
 
 TEST_FILES=(
     https://node1.example.com/10meg.test
@@ -25,4 +27,10 @@ for file in ${TEST_FILES[@]}; do
 done
 
 # send email
-curl -s --http1.0 https://www.xdty.org/mail_extra.php -X POST -d "event=$EVENT&name=$NAME&email=$EMAIL" --data-urlencode extra@$OUTPUT --capath /etc/ssl/certs/
+
+echo -e "Generate chart... \n"
+curl -s --http1.0 $SPEED_URL -X POST -d "time=$TIMEOUT&client=$CLIENT" --data-urlencode extra@$OUTPUT --capath /etc/ssl/certs/
+
+echo -e "Send email... \n"
+curl -s --http1.0 $MAIL_URL -X POST -d "event=$EVENT&name=$NAME&email=$EMAIL" --data-urlencode extra@$OUTPUT --capath /etc/ssl/certs/
+