mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-20 10:21:37 +00:00
26 lines
511 B
PHP
26 lines
511 B
PHP
<?php
|
|
|
|
namespace App\SSHCommands\Service;
|
|
|
|
use App\SSHCommands\Command;
|
|
use Illuminate\Support\Facades\File;
|
|
|
|
class StartServiceCommand extends Command
|
|
{
|
|
public function __construct(protected string $unit)
|
|
{
|
|
}
|
|
|
|
public function file(): string
|
|
{
|
|
return File::get(resource_path('commands/service/start-service.sh'));
|
|
}
|
|
|
|
public function content(): string
|
|
{
|
|
return str($this->file())
|
|
->replace('__service__', $this->unit)
|
|
->toString();
|
|
}
|
|
}
|