- motion runs as uid "motion"
- /var/run is mounted as tmpfs
- /etc/motion/motion.conf defines "process_id_file /var/run/motion/motion.pid"
- /etc/init.d/motion defines "NAME=motion" and "PIDFILE=/var/run/$NAME.pid" (which is different)
A possible fix could be to modify /etc/init.d/motion to include :
(...)
case "$1" in
start)
if check_daemon_enabled ; then log_daemon_msg "Starting motion detection daemon : $NAME"
### BEGIN /var/run Fix MOTIONPIDDIR=/var/run/motion
if test ! -d $MOTIONPIDDIR; then
mkdir -p $MOTIONPIDDIR
chown root:motion $MOTIONPIDDIR
chmod 775 $MOTIONPIDDIR
fi
### END /var/run Fix
if start-stop-daemon --start --oknodo --exec $DAEMON -b --chuid motion ; then log_end_msg 0
else log_end_msg 1
RET=1
fi
fi
;;
(...)
I don't know wether "$PIDFILE", defined in /etc/init.d/motion is used anywhere or not.
This bug still exists in 9.10
$ cat /etc/lsb-release RELEASE= 9.10 CODENAME= karmic DESCRIPTION= "Ubuntu 9.10"
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_
This bug seams to be nearly the same as the one described here (for another package) : /bugs.launchpad .net/ubuntu/ +source/ zabbix/ +bug/172775
https:/
- motion runs as uid "motion" motion. conf defines "process_id_file /var/run/ motion/ motion. pid" /var/run/ $NAME.pid" (which is different)
- /var/run is mounted as tmpfs
- /etc/motion/
- /etc/init.d/motion defines "NAME=motion" and "PIDFILE=
A possible fix could be to modify /etc/init.d/motion to include :
(...)
case "$1" in enabled ; then
log_daemon_ msg "Starting motion detection daemon : $NAME"
MOTIONPIDDIR= /var/run/ motion
log_ end_msg 0
log_ end_msg 1
start)
if check_daemon_
### BEGIN /var/run Fix
if test ! -d $MOTIONPIDDIR; then
mkdir -p $MOTIONPIDDIR
chown root:motion $MOTIONPIDDIR
chmod 775 $MOTIONPIDDIR
fi
### END /var/run Fix
if start-stop-daemon --start --oknodo --exec $DAEMON -b --chuid motion ; then
else
RET=1
fi
fi
;;
(...)
I don't know wether "$PIDFILE", defined in /etc/init.d/motion is used anywhere or not.