winlin

add heartbeat script

  1 +#/bin/bash
  2 +for ((;;)); do
  3 + echo "heatbeat at `date`"
  4 + curl 'http://ossrs.net:8085/api/v1/servers' -H 'Content-Type: text/html' --data-binary "{\"ip\":\"${ip}\",\"device_id\":\"respberry-pi2\"}" && echo ""
  5 + sleep 30
  6 +done