Skip to content

Commit

Permalink
Add OR true to firewall active and enabled commands
Browse files Browse the repository at this point in the history
  • Loading branch information
tnederlof committed Mar 28, 2023
1 parent 092c89a commit af9a5c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/operatingsystem/firewall.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func CheckFirewallStatus(osType config.OperatingSystem) (bool, error) {
return false, nil
}

firewallActive, err := system.RunCommandAndCaptureOutput("systemctl is-active firewalld")
firewallActive, err := system.RunCommandAndCaptureOutput("systemctl is-active firewalld || true")
if err != nil {
return false, fmt.Errorf("issue in firewallActive: %w", err)
}
Expand All @@ -30,7 +30,7 @@ func CheckFirewallStatus(osType config.OperatingSystem) (bool, error) {
return true, nil
}

firewallEnabled, err := system.RunCommandAndCaptureOutput("systemctl is-enabled firewalld")
firewallEnabled, err := system.RunCommandAndCaptureOutput("systemctl is-enabled firewalld || true")
if err != nil {
return false, fmt.Errorf("issue in firewallEnabled check: %w", err)
}
Expand Down

0 comments on commit af9a5c5

Please sign in to comment.