Fix getenforce redirection

This commit is contained in:
WrightNed 2024-02-18 13:51:09 +02:00 committed by GitHub
parent ee2c098995
commit 102a0308c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1028,7 +1028,7 @@ run_status() # Initials - rs
print_single_service_status "$service"
done
if command -v getenforce &>/dev/null && [ "$(getenforce)" != "Disabled" ]; then
if command -v getenforce >/dev/null 2>&1 && [ "$(getenforce)" != "Disabled" ]; then
echo "SELinux has been detected, which could potentially disrupt the agent's normal operation."
fi
}