zoneminder/web/api/app/Controller/HostController.php

26 lines
531 B
PHP
Raw Normal View History

<?php
App::uses('AppController', 'Controller');
class HostController extends AppController {
public $components = array('RequestHandler');
public function daemonCheck($daemon=false, $args=false) {
$string = "`which zmdc.pl` check";
if ( $daemon )
{
$string .= " $daemon";
if ( $args )
$string .= " $args";
}
$result = exec( $string );
$result = preg_match( '/running/', $result );
$this->set(array(
'result' => $result,
'_serialize' => array('result')
));
}
}