Bug 168 - Control scripts paths are relative to ZM_PATH_BIN unless absolute.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1499 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2005-10-04 10:33:58 +00:00
parent f1c76030a9
commit 76403a6723
1 changed files with 2 additions and 0 deletions

View File

@ -345,6 +345,8 @@ if ( isset($action) )
$monitor = mysql_fetch_assoc( $result ); $monitor = mysql_fetch_assoc( $result );
$ctrl_command = $monitor['Command']; $ctrl_command = $monitor['Command'];
if ( !preg_match( '/^\//', $ctrl_command ) )
$ctrl_command = ZM_PATH_BIN.'/'.$ctrl_command;
if ( $monitor['ControlDevice'] ) if ( $monitor['ControlDevice'] )
$ctrl_command .= " --device=".$monitor['ControlDevice']; $ctrl_command .= " --device=".$monitor['ControlDevice'];
if ( $monitor['ControlAddress'] ) if ( $monitor['ControlAddress'] )