Skip to content

Commit

Permalink
Fix conditional logic
Browse files Browse the repository at this point in the history
Signed-off-by: ApplBoy <[email protected]>
  • Loading branch information
ApplBoy committed Jan 23, 2025
1 parent 6d6080d commit e8ff127
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -751,13 +751,18 @@ function get_firewall_binary() {
local firewall_bin
if command -v iptables &>/dev/null; then
firewall_bin=("iptables")
elif command -v nft &>/dev/null; then
fi
if command -v nft &>/dev/null; then
firewall_bin=(firewall_bin "nft")
elif command -v firewalld &>/dev/null; then
fi
if command -v firewalld &>/dev/null; then
firewall_bin=(firewall_bin "firewalld")
elif command -v ufw &>/dev/null; then
fi
if command -v ufw &>/dev/null; then
firewall_bin=(firewall_bin "ufw")
else
fi

if [[ ${#firewall_bin[@]} -eq 0 ]]; then
script_exit 'No firewall binary found.' 1
fi

Expand Down

0 comments on commit e8ff127

Please sign in to comment.