protected function getCommandString() { $command = $this->command; if ($this->asUser) { $command = sprintf('sudo -u %s bash -c %s', escapeshellarg($this->asUser), escapeshellarg($command)); } return $command; }