thanks for your further help on this weedy. I've succeeded in getting ffmpeg to create a pid file by tagging ' pidof ffmpeg > /var/run/stream.pid' onto the end of the ffmpeg command. I''ve also made sure the permissions are chmod 777 on the pid file however the monit log keeps showing:
error : 'stream' process is not running
error : monit: Start or stop method not defined -- process stream
in monitrc I have:
check process stream with pidfile /var/run/stream.pid
start = "/bin/sh /root/stream-start.sh"
I've made sure that stream-start.sh is chmod 777 as well and the command /bin/sh /root/stream-start.sh in the console starts the ffmpeg process ok.
If I start the ffmpeg process manually the monit log shows:
info : 'stream' process is running with pid <number>
but when the ffmpeg process stops the monit log goes back to:
error : 'stream' process is not running
error : monit: Start or stop method not defined -- process stream