I am running a shell command which is invoking an avconv session.
The command is running as a background process
. When the script starts executing I am doing a curl post
to a url with the created process id. And that is working perfectly. But how can I do another curl post when the process getting killed or died?
The script right now, I am running is:
avconv -i rtsp://ipaddress/axis-media/media.amp -r 3 -g 3 -vcodec h264 -c:v libx264 -f mpegts udp://127.0.0.1:10000 & curl --request POST "http://myipaddress/receivce.php" --data "pid=${!}"
If there is nothing to be done after curl
:
while true; do
avconv ... &
curl ... "pid=${!}"
wait $! && break
done
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments