Advertisement
Guest User

Untitled

a guest
Sep 5th, 2015
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. VOPATH=/media/data/motion
  4. MPATH=/home/pi/motion
  5. CAM=1
  6. LIMIT=90
  7.  
  8. pidfile=$MPATH/cam$CAM.pid
  9. if [ ! -f $pidfile ]; then
  10. echo "PID file not found. Nothing to do."
  11. else
  12. echo "PID file exists, stopping ffmpeg process."
  13. read pid < $pidfile
  14. echo "Sending SIGHUP to process $pid."
  15. # use SIGINT for ffmpeg, SIGHUP for openRTSP
  16. kill -HUP $pid
  17. echo "Removing PID file $pidfile."
  18. rm $pidfile
  19. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement