Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- VOPATH=/media/data/motion
- MPATH=/home/pi/motion
- CAM=1
- LIMIT=90
- pidfile=$MPATH/cam$CAM.pid
- if [ ! -f $pidfile ]; then
- echo "PID file not found. Nothing to do."
- else
- echo "PID file exists, stopping ffmpeg process."
- read pid < $pidfile
- echo "Sending SIGHUP to process $pid."
- # use SIGINT for ffmpeg, SIGHUP for openRTSP
- kill -HUP $pid
- echo "Removing PID file $pidfile."
- rm $pidfile
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement