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:
parent
dd2945add1
commit
a501f5bd7a
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue