diff --git a/public_html/deployment/classes/actionlog.class.php b/public_html/deployment/classes/actionlog.class.php index 06d807605e1a5fc3fe3af3cb8a8a624178b7119a..bc677cfea1a1ade93ca354582a9a1a7c66495d83 100644 --- a/public_html/deployment/classes/actionlog.class.php +++ b/public_html/deployment/classes/actionlog.class.php @@ -38,7 +38,8 @@ class Actionlog { } $this->_sProject = $sProject; - if (isset($_SERVER) && is_array($_SERVER)) { + if (isset($_SERVER) && is_array($_SERVER) && array_key_exists("PHP_AUTH_USER", $_SERVER) && $_SERVER["PHP_AUTH_USER"] + ) { $this->_sIP = $_SERVER["REMOTE_ADDR"]; $this->_sUser = $_SERVER["PHP_AUTH_USER"] . " (web)"; } else { @@ -102,35 +103,35 @@ class Actionlog { * 'limit' - limit clausel - part behind "LIMIT " * @return array */ - public function getLogs($aFilter=array()) { + public function getLogs($aFilter = array()) { // var_dump(R::findAll( 'log' )); - $aReturn=array(); - - $sSql='SELECT * from logs '; - $sWhere=false; - if (array_key_exists("where", $aFilter) && $aFilter["where"]){ - $sWhere.=' WHERE (' . $aFilter["where"]. ') '; + $aReturn = array(); + + $sSql = 'SELECT * from logs '; + $sWhere = false; + if (array_key_exists("where", $aFilter) && $aFilter["where"]) { + $sWhere.=' WHERE (' . $aFilter["where"] . ') '; } - if (array_key_exists("project", $aFilter) && $aFilter["project"]){ - $sProjectWhere='`project`="'.$aFilter["project"].'"'; - $sWhere.= $sWhere ? ' AND '. $sProjectWhere : 'WHERE ' . $sProjectWhere; + if (array_key_exists("project", $aFilter) && $aFilter["project"]) { + $sProjectWhere = '`project`="' . $aFilter["project"] . '"'; + $sWhere.= $sWhere ? ' AND ' . $sProjectWhere : 'WHERE ' . $sProjectWhere; } $sSql.=$sWhere; - - if (array_key_exists("order", $aFilter) && $aFilter["order"]){ + + if (array_key_exists("order", $aFilter) && $aFilter["order"]) { $sSql.=' ORDER BY ' . $aFilter["order"]; } else { $sSql.=' ORDER BY id DESC '; } - if (array_key_exists("limit", $aFilter) && $aFilter["limit"]){ + if (array_key_exists("limit", $aFilter) && $aFilter["limit"]) { $sSql.=' LIMIT ' . $aFilter["limit"]; } - + foreach ($this->_makeQuery($sSql) as $row) { - for ($i=0; $i<=7; $i++){ + for ($i = 0; $i <= 7; $i++) { unset($row[$i]); } - $aReturn[]=$row; + $aReturn[] = $row; } return $aReturn; } @@ -145,32 +146,33 @@ class Actionlog { * 'limit' - limit clausel - part behind "LIMIT " * @return string */ - public function renderLogs($aFilter=array()){ - $sReturn=""; - + public function renderLogs($aFilter = array()) { + $sReturn = ""; + static $bWasShown; - if ($bWasShown) return " "; - - $bWasShown=true; - $aData=$this->getLogs($aFilter); - if (!count($aData)){ - $sReturn=t("class-actionlog-nolog"); + if ($bWasShown) + return " "; + + $bWasShown = true; + $aData = $this->getLogs($aFilter); + if (!count($aData)) { + $sReturn = t("class-actionlog-nolog"); } else { $sReturn.='<thead><tr>'; - foreach (array_keys($aData[0]) as $sRow){ - $sReturn.='<th>'.$sRow.'</th>'; + foreach (array_keys($aData[0]) as $sRow) { + $sReturn.='<th>' . $sRow . '</th>'; } $sReturn.='</tr></thead>'; $sReturn.='<tbody>'; - foreach ($aData as $aRow){ - $sReturn.='<tr class="tractionlogs loglevel-'.$aRow["loglevel"].' '.$aRow["project"].'">'; - foreach ($aRow as $sValue){ - $sReturn.='<td>'.$sValue.'</td>'; + foreach ($aData as $aRow) { + $sReturn.='<tr class="tractionlogs loglevel-' . $aRow["loglevel"] . ' ' . $aRow["project"] . '">'; + foreach ($aRow as $sValue) { + $sReturn.='<td>' . $sValue . '</td>'; } $sReturn.='</tr>'; } $sReturn.='</tbody>'; - $sReturn=' + $sReturn = ' <i class="icon-filter"></i> ' . t("overview-textsearch") . ': <input type="text" id="efilterlogs" name="efilterlogs" @@ -184,15 +186,15 @@ class Actionlog { <i class="icon-list-alt"></i> <a href="/deployment/all/setup/actionlog/">all</a><br> - <table class="table">'.$sReturn.'</table>'; + <table class="table">' . $sReturn . '</table>'; } - - $sReturn= '<h3>' + + $sReturn = '<h3>' . '<button onclick="setLogVisibility(\'block\');" id="btnShowLogs" class="btnLogs"><b class="icon-chevron-right"></b> </button>' . '<button onclick="setLogVisibility(\'none\');" id="btnHideLogs" class="btnLogs"><b class="icon-chevron-down"></b> </button>' - . ' '.t("class-actionlog-title").'</h3>' + . ' ' . t("class-actionlog-title") . '</h3>' . '<div id="divActionlogs">' - . '<p>'.t("class-actionlog-filter").': '.print_r($aFilter, true).')</p>' + . '<p>' . t("class-actionlog-filter") . ': ' . print_r($aFilter, true) . ')</p>' . $sReturn . '</div> <script> @@ -230,7 +232,8 @@ class Actionlog { } setLogVisibility(getLogVisibility()); </script>'; - + return $sReturn; } + } diff --git a/public_html/deployment/classes/project.class.php b/public_html/deployment/classes/project.class.php index 10311736d0e5e34bcc9895ec0fb771e3766bbf5b..d5b390ac6fbfd140a877c3cbb9b3457f854bcb95 100644 --- a/public_html/deployment/classes/project.class.php +++ b/public_html/deployment/classes/project.class.php @@ -195,17 +195,17 @@ class project { } return $sReturn; } - + /** * add an action log message * @param string $sMessage message * @param string $sAction project action * @param string $sLoglevel loglevel */ - private function _logaction($sMessage, $sAction="", $sLoglevel="info"){ + private function _logaction($sMessage, $sAction = "", $sLoglevel = "info") { require_once("actionlog.class.php"); - $oLog=new Actionlog($this->_aConfig["id"]); - $oLog->add($sMessage, (__CLASS__."->".$sAction), $sLoglevel); + $oLog = new Actionlog($this->_aConfig["id"]); + $oLog->add($sMessage, (__CLASS__ . "->" . $sAction), $sLoglevel); } // ---------------------------------------------------------------------- @@ -461,7 +461,7 @@ class project { * directories as array * @return array */ - public function cleanupArchive($bDeleteAll=false) { + public function cleanupArchive($bDeleteAll = false) { $aUnused = array(); $sDir = $this->_getProjectArchiveDir(); $this->getVersions(); @@ -475,7 +475,7 @@ class project { } // keep a few - $iKeep=$bDeleteAll?0:$this->_aConfig["versionsToKeep"]; + $iKeep = $bDeleteAll ? 0 : $this->_aConfig["versionsToKeep"]; while (count($aUnused) > $iKeep) { $sVersion = array_shift($aUnused); $sDir2 = $sDir . '/' . $sVersion; @@ -778,7 +778,7 @@ class project { } switch ($this->_aPrjConfig["build"]["type"]) { case "git": - + $sKeyfile = $this->_aConfig["appRootDir"] . "/" . $this->_aPrjConfig["build"]["keyfile"]; $sWrapper = $this->_aConfig["appRootDir"] . "/shellscripts/gitsshwrapper.sh"; @@ -970,8 +970,8 @@ class project { $this->_iRcAll = 0; // return $this->_execAndSend("bash --login -c 'ruby --version' " . $sTempDir); - - $this->_logaction(t('starting')." build()", __FUNCTION__); + + $this->_logaction(t('starting') . " build()", __FUNCTION__); $sReturn = "<h2>" . t("build") . " " . $this->getLabel() . "</h2>"; // -------------------------------------------------- @@ -1002,7 +1002,7 @@ class project { $sReturn.=$this->_execAndSend("ls -ld " . $sTempDir); if (!file_exists($sTempDir)) { $this->_TempDelete(); - $sError=sprintf(t('"class-project-error-build-dir-was-not-created"'), $sTempDir); + $sError = sprintf(t('"class-project-error-build-dir-was-not-created"'), $sTempDir); $this->_logaction($sError, __FUNCTION__, "error"); return $this->getBox("error", $sError . $sReturn); } @@ -1043,15 +1043,15 @@ class project { default: $this->_TempDelete(); - $sError=sprintf(t('class-project-error-build-type-not-supported'), $this->_aPrjConfig["build"]["type"]); + $sError = sprintf(t('class-project-error-build-type-not-supported'), $this->_aPrjConfig["build"]["type"]); $this->_logaction($sError, __FUNCTION__, "error"); - return $this->getBox("error",$sError . $sReturn); + return $this->getBox("error", $sError . $sReturn); } if (!$this->_iRcAll == 0) { $this->_TempDelete(); - $sError=sprintf(t('class-project-error-command-failed'), $sTempDir) . $sReturn; + $sError = sprintf(t('class-project-error-command-failed'), $sTempDir) . $sReturn; $this->_logaction($sError, __FUNCTION__, "error"); - return $this->getBox("error",$sError); + return $this->getBox("error", $sError); } $sReturn.=$this->getBox("success", t('class-project-info-build-checkout-ok')); $aActionList['iActive'] ++; @@ -1068,9 +1068,9 @@ class project { $sReturn.=$this->_execAndSend('bash --login -c \'' . $sTempDir . '/' . $sHookfile . '\''); if (!$this->_iRcAll == 0) { $this->_TempDelete(); - $sError=sprintf(t('class-project-error-command-failed'), $sTempDir) . $sReturn; + $sError = sprintf(t('class-project-error-command-failed'), $sTempDir) . $sReturn; $this->_logaction($sError, __FUNCTION__, "error"); - return $this->getBox("error",$sError); + return $this->getBox("error", $sError); } } else { $sReturn.=t('skip') . '<br>'; @@ -1103,7 +1103,7 @@ class project { $sReturn.=$this->_execAndSend('bash --login -c \'' . $sTempDir . '/' . $sHookfile . '\''); if (!$this->_iRcAll == 0) { $this->_TempDelete(); - $sError=sprintf(t('class-project-error-command-failed'), $sTempDir) . $sReturn; + $sError = sprintf(t('class-project-error-command-failed'), $sTempDir) . $sReturn; $this->_logaction($sError, __FUNCTION__, "error"); return $this->getBox("error", $sError); } @@ -1143,14 +1143,14 @@ class project { if (!$sWebroot) { $this->_TempDelete(); - $sError=t('class-project-error-build-docroot-not-found'); + $sError = t('class-project-error-build-docroot-not-found'); $this->_logaction($sError, __FUNCTION__, "error"); return $this->getBox("error", $sError . $sReturn); } if (!$this->_iRcAll == 0) { $this->_TempDelete(); - $sError=sprintf(t('class-project-error-command-failed'), $sTempDir) . $sReturn; + $sError = sprintf(t('class-project-error-command-failed'), $sTempDir) . $sReturn; $this->_logaction($sError, __FUNCTION__, "error"); return $this->getBox("error", $sError); } @@ -1184,7 +1184,7 @@ class project { $sReturn.=$this->_execAndSend("ls -ld " . dirname($sPackageFileArchiv)); if (!file_exists(dirname($sPackageFileArchiv))) { $this->_TempDelete(); - $sError=sprintf(t('"class-project-error-build-dir-was-not-created"'), $sTempDir); + $sError = sprintf(t('"class-project-error-build-dir-was-not-created"'), $sTempDir); $this->_logaction($sError, __FUNCTION__, "error"); return $this->getBox("error", $sError . $sReturn); } @@ -1214,7 +1214,7 @@ class project { if (!$this->_iRcAll == 0) { $this->_TempDelete(); - $sError=t('class-project-error-build-docroot-not-found'); + $sError = t('class-project-error-build-docroot-not-found'); $this->_logaction($sError, __FUNCTION__, "error"); return $this->getBox("error", $sError . $sReturn); } @@ -1226,8 +1226,8 @@ class project { $sReturn.=t("class-project-info-build-remove-oldest-archives"); $sReturn.='<pre>' . print_r($this->cleanupArchive(), true) . '</pre>'; - $sInfo=t("class-project-info-build-successful"); - $this->_logaction(t('finished').' '.$sInfo, __FUNCTION__, "success"); + $sInfo = t("class-project-info-build-successful"); + $this->_logaction(t('finished') . ' ' . $sInfo, __FUNCTION__, "success"); $sReturn.=$this->getBox("success", $sInfo); $aActionList['iActive'] ++; $this->_TempFill($sReturn, $aActionList); @@ -1257,12 +1257,12 @@ class project { array('label' => t("class-project-queue-label-deploy")), ), ); - $this->_logaction(t('starting')." queue($sPhase, $sVersion)", __FUNCTION__); + $this->_logaction(t('starting') . " queue($sPhase, $sVersion)", __FUNCTION__); $sReturn = "<h2> " . t("queue") . " " . $this->getLabel() . " :: $sPhase</h2>"; $this->_TempFill($sReturn, $aActionList); if (!$this->isActivePhase($sPhase)) { - $sError=sprintf(t("class-project-warning-phase-not-active"), $sPhase); + $sError = sprintf(t("class-project-warning-phase-not-active"), $sPhase); $this->_logaction($sError, __FUNCTION__, "error"); return $this->getBox("error", $sError . $sReturn); } @@ -1311,11 +1311,11 @@ class project { if (!$this->_iRcAll == 0) { $this->_TempDelete(); - $sError=t("class-project-error-command-failed"); + $sError = t("class-project-error-command-failed"); $this->_logaction($sError, __FUNCTION__, "error"); return $this->getBox("error", $sError . $sReturn); } - $this->_logaction(t('finished')." queue($sPhase, $sVersion) " . t("class-project-info-queue-successful"), __FUNCTION__); + $this->_logaction(t('finished') . " queue($sPhase, $sVersion) " . t("class-project-info-queue-successful"), __FUNCTION__); $sReturn.=$this->getBox("success", t("class-project-info-queue-successful")); $sReturn.=$this->deploy($sPhase); $this->_TempDelete(); @@ -1342,12 +1342,12 @@ class project { array('label' => t("class-project-deploy-label-install-on-target")), ), ); - $this->_logaction(t('starting')." deploy($sPhase, $bIgnoreDeploytimes)", __FUNCTION__); + $this->_logaction(t('starting') . " deploy($sPhase, $bIgnoreDeploytimes)", __FUNCTION__); $sReturn = "<h2>" . t("deploy") . " " . $this->getLabel() . " :: $sPhase</h2>"; $this->_TempFill($sReturn, $aActionList); if (!$this->isActivePhase($sPhase)) { - $sError=sprintf(t("class-project-warning-phase-not-active"), $sPhase); + $sError = sprintf(t("class-project-warning-phase-not-active"), $sPhase); $this->_logaction($sError, __FUNCTION__, "error"); return $sReturn . $this->getBox("error", $sError); } @@ -1377,8 +1377,8 @@ class project { } if (!$bCanDeploy) { if (!$bIgnoreDeploytimes) { - $sError=t("class-project-info-deploy-time-not-reached"); - $this->_logaction($sError, __FUNCTION__, "error"); + $sError = t("class-project-info-deploy-time-not-reached"); + $this->_logaction($sError, __FUNCTION__); $sReturn.=$this->getBox("info", $sError); $this->_TempDelete(); return $sReturn; @@ -1391,7 +1391,7 @@ class project { // if () } if (!file_exists($sQueueLink)) { - $sError=sprintf(t("class-project-info-deploy-nothing-in-queue"), $sQueueLink); + $sError = sprintf(t("class-project-info-deploy-nothing-in-queue"), $sQueueLink); $this->_logaction($sError, __FUNCTION__, "error"); $sReturn.=$this->getBox("info", $sError); $this->_TempDelete(); @@ -1417,9 +1417,9 @@ class project { if (!$this->_iRcAll == 0) { $this->_TempDelete(); - $sError=t("class-project-error-command-failed"); + $sError = t("class-project-error-command-failed"); $this->_logaction($sError, __FUNCTION__, "error"); - $sReturn.=$this->getBox("error", $sError. $sReturn); + $sReturn.=$this->getBox("error", $sError . $sReturn); return $sReturn; } @@ -1484,7 +1484,7 @@ class project { $sReturn.="<br>"; $sReturn.=$this->getBox("success", t("class-project-info-deploy-successful")); - $this->_logaction(t('finished')." deploy($sPhase, $bIgnoreDeploytimes) " . t("class-project-info-deploy-successful"), __FUNCTION__, "success"); + $this->_logaction(t('finished') . " deploy($sPhase, $bIgnoreDeploytimes) " . t("class-project-info-deploy-successful"), __FUNCTION__, "success"); $this->_TempDelete(); return $sReturn; } @@ -1497,10 +1497,10 @@ class project { */ public function accept($sPhase) { $sReturn = "<h2>" . t("accept") . " " . $this->getLabel() . " :: $sPhase</h2>"; - $this->_logaction(t('starting')." accept($sPhase)", __FUNCTION__); - + $this->_logaction(t('starting') . " accept($sPhase)", __FUNCTION__); + if (!$this->canAcceptPhase($sPhase)) { - $sError=sprintf(t("class-project-error-accept-impossible"), $sPhase); + $sError = sprintf(t("class-project-error-accept-impossible"), $sPhase); $this->_logaction($sError, __FUNCTION__, "error"); return $sReturn . $this->getBox("error", $sError); } @@ -1514,7 +1514,7 @@ class project { $sReturn.='<pre>' . print_r($aInfos["deployed"], true) . '</pre>'; $sReturn.=$this->getBox("info", sprintf(t("class-project-info-accept-version-and-next-phase"), $sVersion, $sNext)); - $this->_logaction(t('finished')." accept($sPhase)" .sprintf(t("class-project-info-accept-version-and-next-phase"), $sVersion, $sNext), __FUNCTION__, "success"); + $this->_logaction(t('finished') . " accept($sPhase)" . sprintf(t("class-project-info-accept-version-and-next-phase"), $sVersion, $sNext), __FUNCTION__, "success"); $sReturn.=$this->queue($sNext, $sVersion); $this->_TempFill($sReturn); $this->_TempDelete(); @@ -1527,11 +1527,11 @@ class project { * @return boolean */ public function saveConfig($aData = false) { - $this->_logaction(t('starting')." saveConfig(...)", __FUNCTION__); + $this->_logaction(t('starting') . " saveConfig(...)", __FUNCTION__); if (!$aData) $aData = $_POST; if (!array_key_exists("id", $aData)) { - $this->_logaction(t('abortet')." no id in \$_POST", __FUNCTION__, "error"); + $this->_logaction(t('abortet') . " no id in \$_POST", __FUNCTION__, "error"); return false; } // if (!array_key_exists("setupaction", $_POST)) return false; @@ -1551,9 +1551,9 @@ class project { copy($sCfgFile, $sBakFile); $bReturn = file_put_contents($sCfgFile, json_encode($aData)); - $this->_logaction(t('finished')." saveConfig(...)", __FUNCTION__, "success"); + $this->_logaction(t('finished') . " saveConfig(...)", __FUNCTION__, "success"); $this->setProjectById($sId); - + return $bReturn; } @@ -1564,26 +1564,26 @@ class project { * @return string */ public function create($sId) { - $this->_logaction(t('starting')." create($sId)", __FUNCTION__); + $this->_logaction(t('starting') . " create($sId)", __FUNCTION__); if (!$sId) { - $sError=t("class-project-error-create-missing-id"); - $this->_logaction(t('aborted')." create($sId)" . $sError, __FUNCTION__, "error"); + $sError = t("class-project-error-create-missing-id"); + $this->_logaction(t('aborted') . " create($sId)" . $sError, __FUNCTION__, "error"); return $sError; } $s = preg_replace('/[a-z\-\_0-9]*/', "", $sId); if ($s) { - $sError=sprintf(t("class-project-error-create-wrcng-chars-in-id"), $sId); - $this->_logaction(t('aborted')." create($sId)" . $sError, __FUNCTION__, "error"); + $sError = sprintf(t("class-project-error-create-wrcng-chars-in-id"), $sId); + $this->_logaction(t('aborted') . " create($sId)" . $sError, __FUNCTION__, "error"); return $sError; } if ($sId == "all") { - $sError=sprintf(t("class-project-error-create-id-has-reserved-name"), $sId); - $this->_logaction(t('aborted')." create($sId)" . $sError, __FUNCTION__, "error"); + $sError = sprintf(t("class-project-error-create-id-has-reserved-name"), $sId); + $this->_logaction(t('aborted') . " create($sId)" . $sError, __FUNCTION__, "error"); return $sError; } if (array_search($sId, $this->getProjects()) !== false) { - $sError=sprintf(t("class-project-error-create-id-exists"), $sId); - $this->_logaction(t('aborted')." create($sId)" . $sError, __FUNCTION__, "error"); + $sError = sprintf(t("class-project-error-create-id-exists"), $sId); + $this->_logaction(t('aborted') . " create($sId)" . $sError, __FUNCTION__, "error"); return $sError; } @@ -1612,13 +1612,13 @@ class project { $this->_verifyConfig(); // check skeleton $bReturn = $this->saveConfig($this->_aPrjConfig); if (!$bReturn) { - $sError=t("class-project-error-create-save-failed"); - $this->_logaction(t('aborted')." create($sId)" . $sError, __FUNCTION__, "error"); + $sError = t("class-project-error-create-save-failed"); + $this->_logaction(t('aborted') . " create($sId)" . $sError, __FUNCTION__, "error"); return $sError; } // alles OK - dann leeren String - $this->_logaction(t('finished')." create($sId)", __FUNCTION__, "success"); + $this->_logaction(t('finished') . " create($sId)", __FUNCTION__, "success"); return ""; } @@ -1632,21 +1632,21 @@ class project { if (!file_exists($sCfgfile)) { return t("class-project-error-delete-project-no-configfile"); } - $this->_logaction(t('starting')." delete()", __FUNCTION__); - + $this->_logaction(t('starting') . " delete()", __FUNCTION__); + // (array("bRemoveRepolinks", "bRemoveArchive", "bRemoveConfig") // --- remove links in phases directory to built archives if (array_key_exists("bRemoveRepolinks", $aOptions) && $aOptions["bRemoveRepolinks"]) { echo "DELETE Repo-Links ...<br>"; - - foreach (array_keys($this->getPhases()) as $sPhase){ + + foreach (array_keys($this->getPhases()) as $sPhase) { foreach (array_keys($this->_aPlaces) as $sPlace) { - $sLink=$this->_getFileBase($sPhase, $sPlace); - if (file_exists($sLink)){ + $sLink = $this->_getFileBase($sPhase, $sPlace); + if (file_exists($sLink)) { echo "Removing $sLink ($sPhase - $sPlace)...<br>"; if (!unlink($sLink)) { - $sError=t("class-project-error-delete-project-deletion-failed-data"); - $this->_logaction(t('aborted')." ". $sError, __FUNCTION__); + $sError = t("class-project-error-delete-project-deletion-failed-data"); + $this->_logaction(t('aborted') . " " . $sError, __FUNCTION__); return $sError; } } @@ -1667,13 +1667,13 @@ class project { if (file_exists($sCfgfile)) { // echo "Delete ${sCfgfile}<br>"; if (!unlink($sCfgfile)) { - $sError=t("class-project-error-delete-project-deletion-failed-configfile"); - $this->_logaction(t('aborted')." ". $sError, __FUNCTION__); + $sError = t("class-project-error-delete-project-deletion-failed-configfile"); + $this->_logaction(t('aborted') . " " . $sError, __FUNCTION__); return $sError; } } } - $this->_logaction(t('finished')." delete()", __FUNCTION__, "success"); + $this->_logaction(t('finished') . " delete()", __FUNCTION__, "success"); return false; } @@ -2362,12 +2362,12 @@ class project { 'placeholder' => '', ); if ($sPuppethost) { - + // add ssh host key - $sOut0=shell_exec(sprintf($this->_aConfig["installPackages"]["addkeycommand"], $sPuppethost, $sPuppethost)); - - $sCmd2 = 'ssh ' . $this->_aConfig["installPackages"]["user"] - . '@' . $sPuppethost + $sOut0 = shell_exec(sprintf($this->_aConfig["installPackages"]["addkeycommand"], $sPuppethost, $sPuppethost)); + + $sCmd2 = 'ssh ' . $this->_aConfig["installPackages"]["user"] + . '@' . $sPuppethost . ' ' . $this->_aConfig["installPackages"]["testcommand"]; $sOut = shell_exec($sCmd2); // Check auf Versionsnummer - mehr als n Zeichen ist mutmasslich eine Fehlermeldung