mirror of
https://github.com/laravel/valet.git
synced 2026-02-08 01:10:08 +01:00
move caddy
This commit is contained in:
16
src/CaddyFile.php
Normal file
16
src/CaddyFile.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Valet;
|
||||
|
||||
class CaddyFile
|
||||
{
|
||||
/**
|
||||
* Install the Caddy configuration file.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function install()
|
||||
{
|
||||
copy(__DIR__.'/../stubs/Caddyfile', VALET_HOME_PATH.'/Caddyfile');
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,8 @@ public static function install()
|
||||
'VALET_PATH', realpath(__DIR__.'/../'), file_get_contents(__DIR__.'/../stubs/daemon.plist')
|
||||
);
|
||||
|
||||
$contents = str_replace('VALET_HOME_PATH', VALET_HOME_PATH, $contents);
|
||||
|
||||
file_put_contents('/Library/LaunchDaemons/com.laravel.valetServer.plist', $contents);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
<string>VALET_PATH</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>./caddy</string>
|
||||
<string>./bin/caddy</string>
|
||||
<string>--conf=VALET_HOME_PATH/Caddyfile</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
|
||||
Reference in New Issue
Block a user