Skip to content

Commit

Permalink
Check that ufw exists before checking if it is running
Browse files Browse the repository at this point in the history
  • Loading branch information
kueblc committed Feb 29, 2020
1 parent 3cefffa commit d031030
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/setup_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ check_firewall () {
echo "Attempting to stop firewalld.service"
echo "When done, enable with: ${bold}sudo systemctl start firewalld.service${normal}"
fi
if sudo ufw status | grep -qw active; then
if command -v ufw >/dev/null && sudo ufw status | grep -qw active; then
sudo ufw disable
echo "When done, enable with: ${bold}sudo ufw enable${normal}"
fi
Expand Down

0 comments on commit d031030

Please sign in to comment.