add back daemon parameter, but make it actually work
This commit is contained in:
parent
9d8f0fef0c
commit
51d8c0ea73
|
@ -352,8 +352,7 @@ class MonitorsController extends AppController {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function daemonControl($id, $command) {
|
public function daemonControl($id, $command, $daemon=null) {
|
||||||
$daemons = array();
|
|
||||||
|
|
||||||
// Need to see if it is local or remote
|
// Need to see if it is local or remote
|
||||||
$monitor = $this->Monitor->find('first', array(
|
$monitor = $this->Monitor->find('first', array(
|
||||||
|
@ -362,10 +361,14 @@ class MonitorsController extends AppController {
|
||||||
));
|
));
|
||||||
$monitor = $monitor['Monitor'];
|
$monitor = $monitor['Monitor'];
|
||||||
|
|
||||||
if ( $monitor['Function'] == 'Monitor' ) {
|
if ( ! $daemon ) {
|
||||||
array_push($daemons, 'zmc');
|
if ( $monitor['Function'] == 'Monitor' ) {
|
||||||
|
array_push($daemons, 'zmc');
|
||||||
|
} else {
|
||||||
|
array_push($daemons, 'zmc', 'zma');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
array_push($daemons, 'zmc', 'zma');
|
array_push($daemons, $daemon);
|
||||||
}
|
}
|
||||||
|
|
||||||
$zm_path_bin = Configure::read('ZM_PATH_BIN');
|
$zm_path_bin = Configure::read('ZM_PATH_BIN');
|
||||||
|
|
Loading…
Reference in New Issue