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

27 lines
584 B
PHP
Executable File

<?php
namespace App\SSHCommands\Firewall;
use App\SSHCommands\Command;
use Illuminate\Support\Facades\File;
class AddRuleCommand extends Command
{
use CommandContent;
public function __construct(
protected string $provider,
protected string $type,
protected string $protocol,
protected string $port,
protected string $source,
protected ?string $mask = null
) {
}
public function file(): string
{
return File::get(resource_path(sprintf("commands/firewall/%s/add-rule.sh", $this->provider)));
}
}