Pacakge does not create a /var/run/motion directory
Bug #675694 reported by
Mike Koss
This bug report is a duplicate of:
Bug #294852: motion fails to start because /var/run/motion is missing.
Edit
Remove
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
motion (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: motion
Motion requires a /var/run/motion directory to run as a daemon (it stores a motion.pid file there). Without this directory, the daemon will fail to start.
The package should create this directory (chown'ed by 'motion') so user can just set the motion.conf setting for the daemon to run, without having to do additional configuration.
To post a comment you must log in.
Since /var/run is getting cleared at boot - I think the correct fix is to change /etc/init.d/motion to create a /var/run/motion
on daemon start. It needs to be writable by the uid 'motion' as well:
... /var/run/ $NAME enabled ; then
log_daemon_ msg "Starting $DESC" "$NAME"
log_ end_msg 0
log_ end_msg 1
RUNDIR=
...
case "$1" in
start)
if check_daemon_
if [ ! -d $RUNDIR ]; then
mkdir $RUNDIR
chown root:motion $RUNDIR
chmod g+w $RUNDIR
fi
if start-stop-daemon --start --oknodo --exec $DAEMON -b --chuid motion ; then
else
RET=1
fi
fi
;;