1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-12 11:21:52 +00:00

update htbt script

This commit is contained in:
winlin 2015-10-26 14:54:41 +08:00
parent dd2945add1
commit a501f5bd7a

View file

@ -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