Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### BEGIN INIT INFO
- # Provides: picam
- # Required-Start: $remote_fs $syslog
- # Required-Stop: $remote_fs $syslog
- # Default-Start: 2 3 4 5
- # Default-Stop: 0 1 6
- # Short-Description: picam
- # Description: picam
- ### END INIT INFO
- #! /bin/sh
- # /etc/init.d/picam
- export HOME
- case "$1" in
- start)
- echo "Starting picam"
- /home/pi/picam.py 2>&1 &
- ;;
- stop)
- echo "Stopping picam"
- CAM_PID=`ps auxwww | grep picam.py | grep -v grep | head -1 | awk '{print $2}'`
- kill -9 $CAM_PID
- ;;
- *)
- echo "Usage: /etc/init.d/picam {start|stop}"
- exit 1
- ;;
- esac
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement