diff --git a/web/app/Model/AppModel.php b/web/app/Model/AppModel.php index e3ffdede1..d4b5c8057 100644 --- a/web/app/Model/AppModel.php +++ b/web/app/Model/AppModel.php @@ -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');