Made args optional in daemonControl.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@218 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2002-12-24 12:43:13 +00:00
parent 65a07fe591
commit 3e29ec48e3
1 changed files with 7 additions and 1 deletions

View File

@ -81,7 +81,13 @@ function daemonControl( $command, $daemon=false, $args=false )
{ {
$string = ZM_PATH."/zmdc.pl $command"; $string = ZM_PATH."/zmdc.pl $command";
if ( $daemon ) if ( $daemon )
$string .= " $daemon $args"; {
$string .= " $daemon";
if ( $args )
{
$string .= " $args";
}
}
$string .= " 2>/dev/null >&- <&- >/dev/null"; $string .= " 2>/dev/null >&- <&- >/dev/null";
exec( $string ); exec( $string );
} }