1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-07 09:10:03 +01:00

Merge pull request #263 from antonioribeiro/showStartStopInfo

Show start & stop process info in terminal
This commit is contained in:
Adam Wathan
2017-03-23 10:45:26 -04:00
committed by GitHub
4 changed files with 23 additions and 3 deletions

View File

@@ -91,6 +91,8 @@ function ensureInstalled($formula, $options = [], $taps = [])
*/
function installOrFail($formula, $options = [], $taps = [])
{
info("Installing {$formula}...");
if (count($taps) > 0) {
$this->tap($taps);
}
@@ -129,8 +131,12 @@ function restartService($services)
$services = is_array($services) ? $services : func_get_args();
foreach ($services as $service) {
$this->cli->quietly('sudo brew services stop '.$service);
$this->cli->quietly('sudo brew services start '.$service);
if ($this->installed($service)) {
info("Restarting {$service}...");
$this->cli->quietly('sudo brew services stop '.$service);
$this->cli->quietly('sudo brew services start '.$service);
}
}
}
@@ -144,7 +150,11 @@ function stopService($services)
$services = is_array($services) ? $services : func_get_args();
foreach ($services as $service) {
$this->cli->quietly('sudo brew services stop '.$service);
if ($this->installed($service)) {
info("Stopping {$service}...");
$this->cli->quietly('sudo brew services stop '.$service);
}
}
}

View File

@@ -56,6 +56,8 @@ function install()
*/
function installConfiguration()
{
info('Installing nginx configuration...');
$contents = $this->files->get(__DIR__.'/../stubs/nginx.conf');
$this->files->putAsUser(
@@ -97,6 +99,8 @@ function installServer()
*/
function installNginxDirectory()
{
info('Installing nginx directory...');
if (! $this->files->isDir($nginxDirectory = VALET_HOME_PATH.'/Nginx')) {
$this->files->mkdirAsUser($nginxDirectory);
}
@@ -150,6 +154,8 @@ function restart()
*/
function stop()
{
info('Stopping nginx....');
$this->cli->quietly('sudo brew services stop '. $this->brew->nginxServiceName());
}

View File

@@ -54,6 +54,8 @@ function install()
*/
function updateConfiguration()
{
info('Updating PHP configuration...');
$contents = $this->files->get($this->fpmConfigPath());
$contents = preg_replace('/^user = .+$/m', 'user = '.user(), $contents);