16

I have recently get to set up motion with my RPi but I have a problem which is simple one one hand, but, on the other, can’t find any step-by-step instructions to remedy it.

Although I have successfully set up motion and works, after I've made all the necessary tweaks to run it in daemon (edited etc/default/motion & etc/motion/motion.conf), I still can’t get it to start in daemon mode. That said, with every restart of the Pi. I have to manually start the script by “sudo service motion start” or "sudo motion". I know it is an issue with permissions that motion needs to start in daemon but as a complete newbie in the PiWorld, I would appreciate if anyone could guide me through to the 2-3 necessary commands to fix it.

Steve Robillard
  • 34,988
  • 18
  • 106
  • 110
gtj
  • 161
  • 1
  • 1
  • 4

2 Answers2

27

To enable motion to run as a daemon on startup do the following:

Edit /etc/default/motion

and change start_motion_daemon=no to start_motion_daemon=yes

Next enable motion by entering the following at the command line:

sudo systemctl enable motion

Finally reboot.

You can confirm motion is running by checking the output from the following command:

sudo service motion status
Steve Robillard
  • 34,988
  • 18
  • 106
  • 110
3

Confirmed for stretch (v9) as well.

you can also use

$ ps -ef | grep motion

to see if motion is running

Bigdadda06
  • 91
  • 1
  • 5