vito/app/SSHCommands/ProcessManager/Supervisor/StopWorkerCommand.php
Saeed Vaziry 5c72f12490 init
2023-07-02 12:47:50 +02:00

30 lines
616 B
PHP

<?php
namespace App\SSHCommands\ProcessManager\Supervisor;
use App\SSHCommands\Command;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Str;
class StopWorkerCommand extends Command
{
protected $id;
public function __construct($id)
{
$this->id = $id;
}
public function file(string $os): string
{
return File::get(base_path('system/commands/ubuntu/process-manager/supervisor/stop-worker.sh'));
}
public function content(string $os): string
{
$command = $this->file($os);
return Str::replace('__id__', $this->id, $command);
}
}