Motion - Motion Conf Addition
You are here: Foswiki>Motion Web>MotionConfAddition (16 Jul 2005, EvilPete)Edit Attach

Motion Conf Addition Patch


adds conf options to bind to a single IP address, an another config option to create a PID file

Description of Patch

For motion-3.2.1

this patch allows the user to bind the webcam and/or control web services to a single, IP address currently the options are localhost only or any.

conf option: control_addr webcam_addr

these take standard IP addresses as arguments only (not hostnames) if the localhost retrictions ( conf option control_localhost or webcam_localhost ) are set (default) then these options are igmored

adds a option for motion to create a pid file when the system enters daemon mode. conf option: pid_file

if left unset ( default ) none is created.

also ass a command line opt "-p" that does the same

Installation of Patch

patch < patch_ filename

Change History of Patch

20050606 First version

Discussion and Comments

First with motion are included some init.d script that already created PID for motion , so motion doesn't need to create PID itself.

About the bind address for http control interface and webcam we have been discussing yesterday in IRC channel ( #motion in Freenode ) , the best way to include your request and the current behaviour without adding a new option is to change the current webcam_localhost and control_localhost by webcam_interface_bind_ip and control_interface_bind_ip.

IRC dicussion

-- AngelCarpintero - 07 Jun 2005

If you run two motion daemons of the same system the init.d script fails to do the right thing by record the PID of the only the first process. Thus, the command line or option tag seems cleaner and more perhaps more portable.

I'll see about updating he interface IP patch I a day or so (unless you did already)

-- EvilPete - 08 Jun 2005

What should run more than one motion process in the same machine ?

No i didn't update , because you initiated the patch and we just discussed in IRC as i said.

-- AngelCarpintero - 07 Jun 2005

I run more then one moton for several reasions, mostly cause I am working on tweaking the firmware of the Linksys netcam to work better,

One daemon it running and monitoring my home cams, The other i am killing and restarting when I working on code ( for motion or the netcam )

I used to have the main daemon runing in a jailed env ( basicly a Virtual host ) but the init scripts would fuckup. It is a bit of a hack to just do a PS and grab the first process called "motion" and guess/assume it is the currect pid ( or event the same app ).

The way the patch is written if the option is not set no PID file will be created.

-- EvilPete - 10 Jun 2005

Running two instances of Motion is not normal use and I do not think this justifies making Motion more difficult to use for newbies. Writing a pid file is surely going to end up as access denied problems and other problems. When you run one instance of Motion you do not need the PID to kill it. killall motion or pkill motion does the job. So does the supplied init scripts. And so does the http remote control interface.

The other half of the patch was never updated as we suggested. I do not put priority on this myself so for now I let this patch rest.

-- KennethLavrsen - 09 Jul 2005

as implmented, the control_localhost & webcam_localhost option is now obsolete and has been replaced with control_addr & webcam_addr

i agree pid file creation errors may confuse newbies ( even if they got that far..)

they way I set up the pid file option was optional action that defaulted to not doing anything. the file was only created if and only if the option was set by the user.

-- EvilPete - 16 Jul 2005
Topic revision: r9 - 16 Jul 2005, EvilPete
Copyright © 1999-2020 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.