Example #1
0
 protected function cmd($cmd)
 {
     if ($this->user) {
         $cmd = sprintf('sudo -u %s %s', $this->user, $cmd);
     }
     $this->log->debug($cmd);
     $result = shell_exec($cmd);
     $this->log->debug($result);
     return $result;
 }