Esempio n. 1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $daemon = new Daemon($this->config['pidfile'], $this->getLogger());
     switch ($daemon->status()) {
         case Daemon::RUNNING_OK:
             $output->writeln("<info>Phorever is running.</info>");
             break;
         case Daemon::STOPPED_BUT_PID_PRESENT:
             $output->writeln("<error>Phorever is NOT running, but PID file is present!</error>");
             break;
         case Daemon::STOPPED_OK:
             $output->writeln("Phorever is stopped.");
             break;
     }
 }