mirror of
https://github.com/fankes/beszel.git
synced 2025-10-19 17:59:28 +08:00
Remove -Program
parameter from windows firewall rule (#739)
This commit is contained in:
@@ -148,7 +148,7 @@ try {
|
|||||||
# Create new rule with current settings
|
# Create new rule with current settings
|
||||||
Write-Host "Creating firewall rule for beszel-agent on port $Port..."
|
Write-Host "Creating firewall rule for beszel-agent on port $Port..."
|
||||||
try {
|
try {
|
||||||
New-NetFirewallRule -DisplayName $ruleName -Direction Inbound -Program $agentPath -Action Allow -Protocol TCP -LocalPort $Port
|
New-NetFirewallRule -DisplayName $ruleName -Direction Inbound -Action Allow -Protocol TCP -LocalPort $Port
|
||||||
Write-Host "Firewall rule created successfully."
|
Write-Host "Firewall rule created successfully."
|
||||||
} catch {
|
} catch {
|
||||||
Write-Host "Warning: Failed to create firewall rule: $($_.Exception.Message)" -ForegroundColor Yellow
|
Write-Host "Warning: Failed to create firewall rule: $($_.Exception.Message)" -ForegroundColor Yellow
|
||||||
|
Reference in New Issue
Block a user