Merge pull request #1376 from laerciomotta/patch-1
Improve test multiserver restart cam.
This commit is contained in:
commit
46ac2301a7
|
@ -982,6 +982,7 @@ function daemonControl( $command, $daemon=false, $args=false )
|
||||||
|
|
||||||
function zmcControl( $monitor, $mode=false )
|
function zmcControl( $monitor, $mode=false )
|
||||||
{
|
{
|
||||||
|
if ( (!ZM_SERVER) or ( ZM_SERVER==$monitor[ServerId}) ) {
|
||||||
$row = NULL;
|
$row = NULL;
|
||||||
if ( $monitor['Type'] == "Local" )
|
if ( $monitor['Type'] == "Local" )
|
||||||
{
|
{
|
||||||
|
@ -1007,10 +1008,12 @@ function zmcControl( $monitor, $mode=false )
|
||||||
}
|
}
|
||||||
daemonControl( "start", "zmc", $zmcArgs );
|
daemonControl( "start", "zmc", $zmcArgs );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function zmaControl( $monitor, $mode=false )
|
function zmaControl( $monitor, $mode=false )
|
||||||
{
|
{
|
||||||
|
if ( (!ZM_SERVER) or ( ZM_SERVER==$monitor[ServerId}) ) {
|
||||||
if ( !is_array( $monitor ) )
|
if ( !is_array( $monitor ) )
|
||||||
{
|
{
|
||||||
$monitor = dbFetchOne( "select C.*, M.* from Monitors as M left join Controls as C on (M.ControlId = C.Id ) where M.Id=?", NULL, array($monitor) );
|
$monitor = dbFetchOne( "select C.*, M.* from Monitors as M left join Controls as C on (M.ControlId = C.Id ) where M.Id=?", NULL, array($monitor) );
|
||||||
|
@ -1055,6 +1058,7 @@ function zmaControl( $monitor, $mode=false )
|
||||||
daemonControl( "reload", "zma", "-m ".$monitor['Id'] );
|
daemonControl( "reload", "zma", "-m ".$monitor['Id'] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function initDaemonStatus()
|
function initDaemonStatus()
|
||||||
|
|
Loading…
Reference in New Issue