/** * Execute Command. * * @param InputInterface $consoleInput * @param OutputInterface $consoleOutput * * @return int|null|void */ public function execute(InputInterface $consoleInput, OutputInterface $consoleOutput) { GlobalConfig::preFlight($consoleOutput); $command = $this->executable() . ' ' . GlobalConfig::getConfigFile(); $process = new Process($command, realpath(__DIR__ . '/../'), array_merge($_SERVER, $_ENV), null, null); $process->run(function ($type, $line) use($consoleOutput) { $consoleOutput->write($line); }); }
/** * Configure Command. */ public function configure() { $this->setName('decrypt')->setDescription('Decrypt the data from an encrypted output')->addArgument('output', InputArgument::REQUIRED, 'Name of the configured output.')->addArgument('target', InputArgument::REQUIRED, 'Path to save the decrypted data to.')->addArgument('config', InputArgument::OPTIONAL, 'Path to the config file.', GlobalConfig::getConfigFile()); }
/** * Configure Command. */ public function configure() { $this->setName('backup:daemon')->setDescription('Runs wyn as a daemon that acts as a cron and executes the backup:cron command on a regular basis')->addArgument('config', InputArgument::OPTIONAL, 'Path to the config file.', GlobalConfig::getConfigFile())->addOption('interval', null, InputOption::VALUE_OPTIONAL, 'The interval between running the backup:cron command', 3600); $this->setDefaultOptions(); }
/** * Configure Command. */ public function configure() { $this->setName('backup:all')->setDescription('Backups all inputs with configured outputs from the given config file')->addArgument('config', InputArgument::OPTIONAL, 'Path to the config file.', GlobalConfig::getConfigFile()); $this->setDefaultOptions(); }
/** * Configure Command. */ public function configure() { $this->setName('backup:single')->setDescription('Backups a single input to a single output from the given config file')->addArgument('input', InputArgument::REQUIRED, 'Name of the configured input.')->addArgument('output', InputArgument::OPTIONAL, 'Name of the configured output. Required if no output is configured.')->addArgument('config', InputArgument::OPTIONAL, 'Path to the config file.', GlobalConfig::getConfigFile()); $this->setDefaultOptions(); }