1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-06 08:40:09 +01:00

update a few names

This commit is contained in:
Taylor Otwell
2016-05-07 07:33:42 -05:00
parent 177d5f512b
commit f945439634
3 changed files with 10 additions and 26 deletions

View File

@@ -2,7 +2,7 @@
namespace Valet; namespace Valet;
class LaunchDaemon class Caddy
{ {
/** /**
* Install the system launch daemon for the Node proxy. * Install the system launch daemon for the Node proxy.
@@ -11,6 +11,8 @@ class LaunchDaemon
*/ */
public static function install() public static function install()
{ {
copy(__DIR__.'/../stubs/Caddyfile', VALET_HOME_PATH.'/Caddyfile');
$contents = str_replace( $contents = str_replace(
'VALET_PATH', realpath(__DIR__.'/../'), file_get_contents(__DIR__.'/../stubs/daemon.plist') 'VALET_PATH', realpath(__DIR__.'/../'), file_get_contents(__DIR__.'/../stubs/daemon.plist')
); );

View File

@@ -1,16 +0,0 @@
<?php
namespace Valet;
class CaddyFile
{
/**
* Install the Caddy configuration file.
*
* @return void
*/
public static function install()
{
copy(__DIR__.'/../stubs/Caddyfile', VALET_HOME_PATH.'/Caddyfile');
}
}

View File

@@ -33,19 +33,17 @@
$app->command('install', function ($output) { $app->command('install', function ($output) {
should_be_sudo(); should_be_sudo();
Valet\LaunchDaemon::stop(); Valet\Caddy::stop();
Valet\Configuration::install(); Valet\Configuration::install();
Valet\LaunchDaemon::install(); Valet\Caddy::install();
Valet\CaddyFile::install();
Valet\PhpFpm::install($output); Valet\PhpFpm::install($output);
Valet\DnsMasq::install($output); Valet\DnsMasq::install($output);
Valet\LaunchDaemon::restart(); Valet\Caddy::restart();
$output->writeln(PHP_EOL.'<info>Valet installed successfully!</info>'); $output->writeln(PHP_EOL.'<info>Valet installed successfully!</info>');
}); });
@@ -190,7 +188,7 @@
should_be_sudo(); should_be_sudo();
Valet\PhpFpm::restart(); Valet\PhpFpm::restart();
Valet\LaunchDaemon::restart(); Valet\Caddy::restart();
$output->writeln('<info>Valet services have been started.</info>'); $output->writeln('<info>Valet services have been started.</info>');
}); });
@@ -202,7 +200,7 @@
should_be_sudo(); should_be_sudo();
Valet\PhpFpm::restart(); Valet\PhpFpm::restart();
Valet\LaunchDaemon::restart(); Valet\Caddy::restart();
$output->writeln('<info>Valet services have been restarted.</info>'); $output->writeln('<info>Valet services have been restarted.</info>');
}); });
@@ -214,7 +212,7 @@
should_be_sudo(); should_be_sudo();
Valet\PhpFpm::stop(); Valet\PhpFpm::stop();
Valet\LaunchDaemon::stop(); Valet\Caddy::stop();
$output->writeln('<info>Valet services have been stopped.</info>'); $output->writeln('<info>Valet services have been stopped.</info>');
}); });
@@ -225,7 +223,7 @@
$app->command('uninstall', function ($output) { $app->command('uninstall', function ($output) {
should_be_sudo(); should_be_sudo();
Valet\LaunchDaemon::uninstall(); Valet\Caddy::uninstall();
$output->writeln('<info>Valet has been uninstalled.</info>'); $output->writeln('<info>Valet has been uninstalled.</info>');
}); });