1

我可以在 Raspberry 2 中调整运动检测:

/etc/default/motion

我将start_motion_daemon=no更改为start_motion_daemon=yes

接下来,我通过在命令行中输入以下内容来启用运动:

sudo systemctl enable motion

最后

reboot or sudo service motion restart

和我的地位

sudo service motion status

pi@raspberrypi:~ $ sudo service motion status
● motion.service - LSB: Start Motion detection
   Loaded: loaded (/etc/init.d/motion)
   Active: active (running) since So 2016-10-30 17:49:26 CET; 4min 25s ago
  Process: 1076 ExecStop=/etc/init.d/motion stop (code=exited, status=0/SUCCESS)
  Process: 1109 ExecStart=/etc/init.d/motion start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/motion.service
           └─1120 /usr/bin/motion

Okt 30 17:52:52 raspberrypi motion[1120]: [1] [NTC] [EVT] event_newfile: File of type 1 saved to: /home/pi/motion/01-20161030175252-00.jpg
Okt 30 17:52:53 raspberrypi motion[1120]: [1] [NTC] [EVT] event_newfile: File of type 1 saved to: /home/pi/motion/01-20161030175252-01.jpg
Okt 30 17:53:01 raspberrypi motion[1120]: [1] [NTC] [EVT] event_newfile: File of type 1 saved to: /home/pi/motion/01-20161030175300-01.jpg

但我在/etc/motion/motion.conf中触发的运动(测试)事件

on_event_start echo "event start"%f >> /home/pi/motion.detect

只有当我这样做时才有效

sudo motion

而不是

sudo service motion restart
sudo /etc/init.d/motion restart

第一个主要问题:有人知道,这里有什么问题吗?

第二个问题:为什么在命令行中给 sudo /etc/init.d/motion restart 一个输出

pi@raspberrypi:~ $ sudo /etc/init.d/motion restart
[ ok ] Restarting motion (via systemctl): motion.service.

sudo service motion restart 

不是 ?

4

0 回答 0