Showing posts with label reboot. Show all posts
Showing posts with label reboot. Show all posts

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!

Tuesday, November 5, 2013

Raspberry Pi Journal #35


Cron Macro


Cron and the accompanying crontab is a scheduler. That is, you set the schedule for the programs you want to run at certain times. The instruction is clear enough, except, there is absolutely no instruction about the macro. By that I mean @hourly and others. I really can't find any instruction at all! I know @hourly is present because it is mentioned there. How about other macros? @daily, @weekly seem obvious. How about @minutely? Is that valid? I have no idea.

Here's something else: @reboot.

Yeah, I read that in some instruction pages somewhere, except I don't know how that person know that there is such instruction! It's not mentioned anywhere that I checked! Well, there's only one thing to do, then, isn't it? Try it out and see if the program really runs at booting time.

Strange that the macro is named @reboot. One would think that @boot would be more appropriate. No, I don't know if @boot macro exists. Like I said, there's no documentation that I can find anywhere.