rtmpub.sh 327 B

123456789101112
  1. #!/bin/bash
  2. # ROOT=$(cd `dirname $0`/../../; pwd)
  3. ROOT=$(cd `dirname $0`/; pwd)
  4. TOPIC=test
  5. URL=http://127.0.0.1:9051/mpub?topic=$TOPIC
  6. echo url: $URL
  7. DATE=$(date "+%Y-%m-%d %H:%M:%S").$((`date "+%N"`/1000000))
  8. echo date: $DATE
  9. MSG="hello world 1 \n hello world 2\nhello world 3 date:$DATE"
  10. echo MSGS: $MSG
  11. curl -d "$MSG" $URL