Esempio n. 1
0
 /**
  * Execute command.
  *
  * @param InputInterface  $input
  * @param OutputInterface $output
  *
  * @return void
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     parent::execute($input, $output);
     try {
         $this->showIntro();
     } catch (AbortException $e) {
         return;
     }
     $transformer = $this->getParametersYamlTransformer();
     $database = $this->_configureDatabase();
     $crypto = $this->_configureCrypto();
     $misc = $this->_configureMisc();
     $transformer->addForm($database)->addForm($crypto)->addForm($misc);
     try {
         $output->writeln('Generating parameters.yml...');
         $this->generateParametersYaml($transformer);
         $output->writeln('<info>parameters.yml created successfully.</info>');
     } catch (IOException $e) {
         $output->writeln(sprintf('Could not save configuration: "%s"', $e->getMessage()));
         return;
     }
     $this->runConsoleCommand(array('command' => 'cache:clear'));
     $output->writeln('<info>Run "lampcp lampcp:setup:vhost" to create a vhost.</info>');
     return;
 }
Esempio n. 2
0
 /**
  * Execute command.
  *
  * @param InputInterface  $input
  * @param OutputInterface $output
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     parent::execute($input, $output);
     $this->setupLampcp();
     $vhost = $this->_configureVhost();
     $domain = $this->_generateLampcpDomain($vhost);
     $this->persistDomain($domain);
     $this->getOutput()->writeln(array('<info>The vhost is configured successfully.</info>', 'See https://github.com/jeboehm/LampCP/wiki/Installation for further instructions.'));
 }