mirror of
https://github.com/laravel/valet.git
synced 2026-02-05 00:20:08 +01:00
Uses the correct service name if nginx-full is installed instead of nginx
This commit is contained in:
@@ -56,6 +56,16 @@ function hasInstalledNginx()
|
||||
|| $this->installed('nginx-full');
|
||||
}
|
||||
|
||||
/**
|
||||
* Return name of the nginx service installed via Homebrewed.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function nginxServiceName()
|
||||
{
|
||||
return $this->installed('nginx-full') ? 'nginx-full' : 'nginx';
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure that the given formula is installed.
|
||||
*
|
||||
|
||||
@@ -122,7 +122,7 @@ function rewriteSecureNginxFiles()
|
||||
*/
|
||||
function restart()
|
||||
{
|
||||
$this->cli->quietly('sudo brew services restart nginx');
|
||||
$this->cli->quietly('sudo brew services restart '. $this->brew->nginxServiceName());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -132,7 +132,7 @@ function restart()
|
||||
*/
|
||||
function stop()
|
||||
{
|
||||
$this->cli->quietly('sudo brew services stop nginx');
|
||||
$this->cli->quietly('sudo brew services stop nginx'. $this->brew->nginxServiceName());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user