mirror of
https://github.com/vernu/vps-audit.git
synced 2025-01-23 05:24:58 +03:00
fix check status of ufw
there is "active" in "inactive" word so we should check the whole word with -w switch in grep
This commit is contained in:
parent
463c0fe379
commit
da09fcea46
@ -166,7 +166,7 @@ fi
|
||||
# Check Firewall Status
|
||||
check_firewall_status() {
|
||||
if command -v ufw >/dev/null 2>&1; then
|
||||
if ufw status | grep -q "active"; then
|
||||
if ufw status | grep -qw "active"; then
|
||||
check_security "Firewall Status (UFW)" "PASS" "UFW firewall is active and protecting your system"
|
||||
else
|
||||
check_security "Firewall Status (UFW)" "FAIL" "UFW firewall is not active - your system is exposed to network attacks"
|
||||
|
Loading…
Reference in New Issue
Block a user