Ejemplo n.º 1
0
 /**
  *
  * @return \OCA\EasyBackup\StatusContainer
  */
 public function createStatusInformation()
 {
     $statusContainer = new StatusContainer();
     $statusContainer->addStatus('safeMode', $this->checkSafeModeNotEnabled() ? StatusContainer::OK : StatusContainer::ERROR, $this->trans->t('safe mode may not be enabled'));
     $statusContainer->addStatus('rsyncPresent', $this->checkRsyncPresent() ? StatusContainer::OK : StatusContainer::ERROR, $this->trans->t('rsync must be present in execution path'));
     $statusContainer->addStatus('rsyncExecutable', $this->checkRsyncExecutable() ? StatusContainer::OK : StatusContainer::ERROR, $this->trans->t('rsync binary needs to be executable'));
     // $statusContainer->addStatus('mysqldumpPresent', $this->checkMysqldumpPresent() ? StatusContainer::OK : StatusContainer::WARN, $this->trans->t('mysqldump binary is present in execution path'));
     // $statusContainer->addStatus('mysqldumpExecutable', $this->checkMysqldumpExecutable() ? StatusContainer::OK : StatusContainer::WARN, $this->trans->t('mysqldump binary may be executed'));
     $statusContainer->addStatus('osIsLinux', php_uname('s') == 'Linux' ? StatusContainer::OK : StatusContainer::ERROR, $this->trans->t('operating system must be Linux'));
     $statusContainer->addStatus('cronAvailable', $this->configService->isCronEnabled() ? StatusContainer::OK : StatusContainer::WARN, $this->trans->t('scheduled tasks should be executed via CRON'));
     $statusContainer->addStatus('privateKeyPresent', file_exists($this->configService->getPrivateKeyFilename()) ? StatusContainer::OK : StatusContainer::ERROR, $this->trans->t('private key for backup authentication'));
     $statusContainer->addStatus('hostNameValid', $this->isHostUserNameValid() ? StatusContainer::OK : StatusContainer::ERROR, $this->trans->t('host user name validation'));
     return $statusContainer;
 }