diff --git a/web/api/app/Controller/HostController.php b/web/api/app/Controller/HostController.php index b89784818..db1a673c5 100644 --- a/web/api/app/Controller/HostController.php +++ b/web/api/app/Controller/HostController.php @@ -21,6 +21,17 @@ class HostController extends AppController { )); } + // an interface to individually control the various ZM daemons + // invocation: https://server/zm/api/host/daemonControl/.pl/.json + public function daemonControl($daemon_name, $command) { + $string = ZM_PATH_BIN."/zmdc.pl $command $daemon_name"; + $result = exec($string); + $this->set(array( + 'result' => $result, + '_serialize' => array('result') + )); + } + function getLoad() { $load = sys_getloadavg();