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

@ -40,6 +40,15 @@ class AppModel extends Model {
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');
for ( $i = 1; $i < func_num_args(); $i++ ) {