[FrameworkBundle] Added link on server:* commands

This commit is contained in:
Grégoire Pineau 2014-09-22 14:51:39 +02:00
parent c85bed20e9
commit ce62ccfcdd
3 changed files with 9 additions and 7 deletions

View File

@ -84,8 +84,10 @@ EOF
return 1;
}
$address = $input->getArgument('address');
if ($pid > 0) {
$output->writeln('<info>Server started successfully</info>');
$output->writeln(sprintf('<info>Web server listening on http://%s</info>', $address));
return;
}
@ -97,7 +99,7 @@ EOF
}
$process = $this->createServerProcess(
$input->getArgument('address'),
$address,
$input->getOption('docroot'),
$input->getOption('router'),
$env,
@ -105,7 +107,7 @@ EOF
);
$process->disableOutput();
$process->start();
$lockFile = $this->getLockFile($input->getArgument('address'));
$lockFile = $this->getLockFile($address);
touch($lockFile);
if (!$process->isRunning()) {

View File

@ -50,9 +50,9 @@ class ServerStatusCommand extends ServerCommand
}
if (file_exists($this->getLockFile($address))) {
$output->writeln(sprintf('<info>Web server still listening on %s</info>', $address));
$output->writeln(sprintf('<info>Web server still listening on http://%s</info>', $address));
} else {
$output->writeln(sprintf('<error>No web server is listening on %s</error>', $address));
$output->writeln(sprintf('<error>No web server is listening on http://%s</error>', $address));
}
}

View File

@ -56,12 +56,12 @@ EOF
$lockFile = $this->getLockFile($address);
if (!file_exists($lockFile)) {
$output->writeln(sprintf('<error>No web server is listening on %s</error>', $address));
$output->writeln(sprintf('<error>No web server is listening on http://%s</error>', $address));
return 1;
}
unlink($lockFile);
$output->writeln(sprintf('<info>Stopped the web server listening on %s</info>', $address));
$output->writeln(sprintf('<info>Stopped the web server listening on http://%s</info>', $address));
}
}