Motion - Support Question 2009x 11x 25x 023300

Ubuntu 9.10 and Motion as Daemon

Question

Why motion don't start as daemon on computer start.

The installation was made via sudo aptitude install motion

I configure /etc/motion/motion.conf
# Daemon
############################################################

# Start in daemon (background) mode and release terminal (default: off)
daemon on

# File to store the process ID, also called pid file. (default: not defined)
# process_id_file /var/run/motion/motion.pid 
process_id_file

############################################################
# Basic Setup Mode
############################################################

# Start in Setup-Mode, daemon disabled. (default: off)
setup_mode off

After that I configure /etc/default/motion
# set to 'yes' to enable the motion daemon
start_motion_daemon=yes

It suppose that the archive motion on /etc/init.d will be call via a link on /etc/rc2.d at the machine start. so at the beginning the camera turn on but when the system ask for your password to access to your section
the camera turns off.

Environment

Motion version: 3.2.11.1
ffmpeg version:  
Libraries: ffmpeg, mysql, postgresql
Server OS:  

ANSWER --------------------------------------------------------------------------------------------

I have the same problem, with same version, my soltion was, edit "/etc/init.d/motion"

and insert the code (between ############insert#########)

case "$1" in
start)
if check_daemon_enabled ; then
log_daemon_msg "Starting motion detection daemon : $NAME"

###############insert########
if [ ! -e "/var/run/motion" ]; then
mkdir /var/run/motion
chown motion /var/run/motion
fi
###############endinsert######

if start-stop-daemon --start --oknodo --exec $DAEMON -b --chuid motion ; then

and change all "Directoryies" where motion is writing to Owner motion.

(PS:I am not a great programmer, but it works,

....I think it is a UID problem ..)

Answer

Hi Mario,

Sorry but this issue should be filled to ubuntu as we don't supply any rc script since this was handled by debian / ubuntu.

Anyway without logs it's kinda hard to guess your problem.
Topic revision: r3 - 23 Feb 2010, FranzFoedermayr
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.