start.sh 412 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. if [ ! -d $HOME/rec ]; then
  3. mkdir $HOME/rec
  4. fi
  5. if [ ! -d /tmp/hls/ispooge.com ]; then
  6. mkdir -p /tmp/hls/ispooge.com
  7. fi
  8. chmod -R a+rx /tmp/hls
  9. chmod a+ws /tmp/hls/ispooge.com
  10. docker run \
  11. --name rtmp-proxy \
  12. -d --restart always \
  13. -p 1935:1935 \
  14. --mount type=bind,source=/tmp/hls/ispooge.com,target=/tmp/hls/ispooge.com \
  15. --mount type=bind,source=$HOME/rec,target=/tmp/rec \
  16. nginx-rtmp