load the actual env from the server

This commit is contained in:
Saeed Vaziry
2024-02-22 20:30:21 +01:00
parent 9db310a06b
commit 682da0d6d5
7 changed files with 42 additions and 7 deletions

View File

@ -0,0 +1,26 @@
<?php
namespace App\SSHCommands\Website;
use App\SSHCommands\Command;
use Illuminate\Support\Facades\File;
class GetEnvCommand extends Command
{
public function __construct(
protected string $domain
) {
}
public function file(): string
{
return File::get(resource_path('commands/website/get-env.sh'));
}
public function content(): string
{
return str($this->file())
->replace('__domain__', $this->domain)
->toString();
}
}