Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/sh
- # /etc/init.d/mjpg_streamkick
- # Carry out specific functions when asked to by the system
- case "$1" in
- start)
- echo "Starting mjpg_streamkick script"
- sudo mkdir /run/tmp
- sleep 1s
- nohup raspistill --nopreview -w 640 -h 480 -q 10 -o /run/tmp/pic.jpg -tl 1000 -t 2147483647 -th 0:0:0 &
- sleep 10s
- #export LD_LIBRARY_PATH=/usr/local/bin
- /usr/local/bin/mjpg_streamer -i "/usr/local/lib/input_file.so -f /run/tmp -n pic.jpg" -o "/usr/local/lib/output_http.so -w /usr/local/www -p **ENTER PORT HERE** -c **USER::PASSWORD HERE**" &
- ;;
- stop)
- echo "Stopping webcam script"
- killall mjpg_streamer
- echo "Stopping image capture"
- killall raspistill
- ;;
- *)
- echo "Usage: /etc/init.d/mjpg_streamkick {start|stop}"
- exit 1
- ;;
- esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement