Tuesday, December 17, 2013

Raspberry Pi Journal #41

Portable Webcam Network cron @reboot

Okay. Last time we messed around with webcam, we messed around with motion daemon as a service. Well, I found out an easier way to do it. So, the first thing we want to do is to disable the motion service. This, of course, after spending a whole day setting it up. Siiiiiiiiigh.

  1. Go to /etc/default
  2. Open up motion file
  3. change the line start_motion_daemon=yes to start_motion_daemon=no
  4. Go to /etc/motion
  5. set motion not to run as daemon in motion.conf (daemon off)
  6. set process_id_file as undefined
  7. Goto to home directory
  8. run crontab -e
  9. Add the line @reboot motion &

And that's it. Just one little @reboot word in the right place. It runs the program at boot (and reboot) time. That's all there is to it. For bonus, it runs as the proper user, so file permission isn't a problem. Make sure that it runs in the background (enable daemon) on motion.conf. Tada!!! Done! 10 minutes!

No comments:

Post a Comment