NGiNX RTMP module exec_xxx commands not working

Viewed 1423

I a having trouble nginx 1.10.3 and rtmp module exec_xxx commands. I have nginx.conf with the following code.

rtmp {
  ...  
server {
   ...
application dash {      #creates a rtmp application
    exec_options on;
    exec_pull           /bin/bash /usr/local/nginx/conf/ping.sh pull;
    exec_push           /bin/bash /usr/local/nginx/conf/ping.sh push;
    exec_static         /bin/bash /usr/local/nginx/conf/ping.sh static;
    exec_publish        /bin/bash /usr/local/nginx/conf/ping.sh publish;
    ...

I can read the rtmp DASH video externally that I publish internally from local host. So I know the conf file is working. I can also verify the directives are active with 'sudo -i nginx -T | grep exec_'. But the ping.sh (shown below) is not being executed.

#!/bin/bash
touch ./test.txt
/bin/echo "got message 1=$1 2=$2 3=$3" 
/bin/echo "got message 1=$1 2=$2 3=$3" >>/usr/local/nginx/conf/exec_log.txt

The ping.sh command works when executed from ~/nginx/. How can I tell why the exec_pull static and other 'exec_xxx' commands are not working?

0 Answers
Related