Path to control scripts

Support and queries relating to all previous versions of ZoneMinder
Locked
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Path to control scripts

Post by rdmelin »

Hi Phil,
In setting up an Axis213 PTZ camera I had trouble getting PTZ fuctions to work. I found in /var/log/httpd/error.log:
sh: /usr/local/bin/zmcontrol-axis-v2.pl: No such file or directory
This system is installed from my rpm which calls ./configure with --prefix=/usr

I was able to get things working by symlinking the control scripts to /usr/local/bin

I then went looking for where the wrong path is called from. I haven't found it yet, but came across these lines:
grep '/usr/local' /usr/bin/zm*
/usr/bin/zmtrack.pl: my $suspend_cmd = "/usr/local/bin/zmu -m ".$monitor->{Id}." -u -U admin -P pc00zm";
/usr/bin/zmtrack.pl: my $resume_cmd = "/usr/local/bin/zmu -m ".$monitor->{Id}." -r -U admin -P pc00zm";
Best regards,

Ross
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Hi Ross,
This has been brought to my attention. The Path setting are in the controls table in the database as well. I'm working on a patch to bring the path setting out into zm.conf for the moment and then later will work maybe on having them set using the configure script.

Phil, is there any where else this path may be coded in? It looks like we have them all but I just want to make sure. I put a patch file up for your review that actualy has two things. First is The code I wrote that checks the symlinks used for the export function. It creates any missing links and removes any that are not cameras in the database, It is tested and working.
Second is, there was a hard coded path in zmtrack.pl.z. I changed it to the variable ZM_PATH_BIN and contecated ZMU. I don't know if this is correct and have no PTZ camera to test with so I need someone to check me here.
I don't know this patch to 100% work for the zmtrack.pl.z so no one use this patch as it is not complete or tested. If you do so, it is at your own risk! Disclaimer being said, Here is the file:
http://www.computerntelecom.com/downloa ... 10.1.patch
The database would also need the command colum changed in the controls table so that it is just the file being called.
This is still work in progress. I'm working on the patch for the path in the database now and will update the same directory above with another patch once I have it sorted. At the moment I'm not finding where this path is being retrived and used from the database so till I find it and understand it, It may take a bit unless Phil happens in and can point me in the right direction.

Regards,
Cordel
Locked