Skip to content

Commit

Permalink
Merge pull request #124 from sol-eng/add-true-commands-firewall
Browse files Browse the repository at this point in the history
Add OR true to firewall active and enabled commands
  • Loading branch information
tnederlof authored Mar 28, 2023
2 parents 092c89a + af9a5c5 commit 45b9032
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 45b9032

Please sign in to comment.