mirror of
https://github.com/xdtianyu/scripts.git
synced 2025-09-24 04:59:21 +08:00
fix url
This commit is contained in:
@@ -1,10 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
EMAIL="YOUR_EMAIL@example.com"
|
EMAIL="YOUR_EMAIL@example.com"
|
||||||
TIMEOUT=20
|
TIMEOUT=15
|
||||||
NAME="speedtest"
|
NAME="speedtest"
|
||||||
EVENT="finished"
|
EVENT="finished"
|
||||||
OUTPUT=/tmp/wget.speedtest
|
OUTPUT=/tmp/wget.speedtest
|
||||||
|
SPEED_URL=https://example.com/speed.php
|
||||||
|
MAIL_URL=https://example.com/mail_extra.php
|
||||||
|
|
||||||
TEST_FILES=(
|
TEST_FILES=(
|
||||||
https://node1.example.com/10meg.test
|
https://node1.example.com/10meg.test
|
||||||
@@ -25,4 +27,10 @@ for file in ${TEST_FILES[@]}; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# send email
|
# 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/
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user