Adding a function to control the daemons (start, stop, etc)

This commit is contained in:
Kyle Johnson 2013-09-06 15:01:05 -04:00
parent 6a9ce02870
commit 48d162d432
1 changed files with 10 additions and 1 deletions

View File

@ -38,7 +38,16 @@ class AppModel extends Model {
$string = $zm_path_bin."/zmdc.pl status";
$daemon_status = shell_exec ( $string );
return $daemon_status;
}
}
function daemonControl( $command ) {
$string = Configure::read('ZM_PATH_BIN')."/zmdc.pl $command";
$string .= " 2>/dev/null >&- <&- >/dev/null";
$return = exec( $string );
return $return;
}
public function reScale( $dimension, $dummy) {
$scale_base = Configure::read('SCALE_BASE');