private static function copySupNRPECfg($deployment, $revision, array $supnrpeInfo) { if (self::$init === false) { self::init(); } RevDeploy::writeDeploymentSupNRPECfg($deployment, $supnrpeInfo, $revision); }
public function supwrite() { $viewData = new ViewData(); $deployment = $this->getDeployment('sup_nrpe_cfg_error'); $this->checkGroupAuth($deployment); $this->checkDeploymentRevStatus($deployment); $modrevision = RevDeploy::getDeploymentNextRev($deployment); $supnrpeInfo = $this->fetchSupNRPEInfo($deployment, 'sup_nrpe_cfg_stage', $modrevision); $viewData->deployment = $deployment; if ($supnrpeInfo['cmds'] !== false) { RevDeploy::writeDeploymentSupNRPECfg($deployment, $supnrpeInfo, $modrevision); $this->sendResponse('sup_nrpe_cfg_write', $viewData); } else { RevDeploy::deleteDeploymentSupNRPECfg($deployment, $modrevision); $this->sendResponse('sup_nrpe_cfg_del', $viewData); } }