Only start a monitor if it has a Function

This commit is contained in:
Isaac Connor 2017-11-05 11:54:00 -05:00
parent 7374ced076
commit bef7c0ed94
1 changed files with 3 additions and 1 deletions

View File

@ -301,6 +301,7 @@ private $control_fields = array(
$values[] = $this->{'Id'};
dbQuery( $sql, $values );
} // end function save
function zmcControl( $mode=false ) {
if ( (!defined('ZM_SERVER_ID')) or ( ZM_SERVER_ID==$this->{'ServerId'} ) ) {
if ( $this->{'Type'} == 'Local' ) {
@ -315,7 +316,8 @@ private $control_fields = array(
if ( $mode == 'restart' ) {
daemonControl( 'stop', 'zmc', $zmcArgs );
}
daemonControl( 'start', 'zmc', $zmcArgs );
if ( $this->{'Function'} != 'None' )
daemonControl( 'start', 'zmc', $zmcArgs );
}
} else {
$Server = $this->Server();