vito/app/SSHCommands/Service/StartServiceCommand.php
2023-08-04 18:28:04 +02:00

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();
}
}