From a501f5bd7a0727872460b466ff77216f5999c9ab Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 26 Oct 2015 14:54:41 +0800 Subject: [PATCH] update htbt script --- trunk/scripts/htbt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trunk/scripts/htbt.sh b/trunk/scripts/htbt.sh index 6e2ab445b..ffd0f747f 100755 --- a/trunk/scripts/htbt.sh +++ b/trunk/scripts/htbt.sh @@ -1,7 +1,7 @@ #/bin/bash -ip=`ifconfig 2>&1|grep "inet addr"|grep -v "127"|awk '{print $2}'|awk -F ':' '{print $2}'` for ((;;)); do - echo "heatbeat at `date`" + ip=`ifconfig 2>&1|grep "inet addr"|grep -v "127"|awk '{print $2}'|awk -F ':' '{print $2}'` + echo "heatbeat at `date`, ip is ${ip}" curl 'http://ossrs.net:8085/api/v1/servers' -H 'Content-Type: text/html' --data-binary "{\"ip\":\"${ip}\",\"device_id\":\"respberry-pi2\"}" && echo "" sleep 10 done