bug fix
This commit is contained in:
parent
46ee6e34d6
commit
fc4a4aafb4
|
@ -395,4 +395,14 @@ class UpdateSoftwareCommand extends Command
|
||||||
$state['log'] .= $output->getVerbosity() >= OutputInterface::VERBOSITY_NORMAL ? $message . "\n" : '';
|
$state['log'] .= $output->getVerbosity() >= OutputInterface::VERBOSITY_NORMAL ? $message . "\n" : '';
|
||||||
file_put_contents($this->stateFile, json_encode($state));
|
file_put_contents($this->stateFile, json_encode($state));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function backupArchive(): string
|
||||||
|
{
|
||||||
|
$tarFile = $this->backupDir . '/hesabixArchive_backup_' . time() . '.tar';
|
||||||
|
$this->runProcess(['tar', '-cf', $tarFile, '-C', $this->rootDir, 'hesabixArchive'], $this->rootDir, new \Symfony\Component\Console\Output\NullOutput());
|
||||||
|
if (!file_exists($tarFile)) {
|
||||||
|
throw new \RuntimeException('Failed to create tar backup of hesabixArchive.');
|
||||||
|
}
|
||||||
|
return $tarFile;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue