I have written a shell script
checklick.sh on my CentOS box with the following content:
#!/bin/sh # # description: check link through rtmpdump # . /etc/rc.d/init.d/functions DUMPUTIL=/usr/bin/rtmpdump "$DUMPUTIL" -B 1 -r "$1" -o /tmp/rtmp-checker.log && echo_success || echo_failure
and executed by
Now, from the following output:
I need to know how to force exit the script when the log prints
ERROR: RTMP_ReadPacket, failed to read RTMP packet header because I'm calling the script from PHP
exec native function and is waiting forever for the exit code but the script does not return the exit code.