[FrameworkBundle] Added link on server:* commands
This commit is contained in:
parent
c85bed20e9
commit
ce62ccfcdd
@ -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()) {
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user