private function _getenv($name) { /*{{{*/ $result = Tool::runShellCmd("echo \${$name}", true); return $result['last_line']; }
private function _restartApache() { /*{{{*/ $cmd = 'sudo /usr/local/apache2/bin/apachectl -t'; $result = Tool::runShellCmd($cmd); if (0 != $result['return_var']) { throw new Exception("apache conf error"); } $cmd = 'sudo /usr/local/apache2/bin/apachectl graceful'; Tool::runShellCmd($cmd); echo "apache restart successful\n"; }