fix SELinux check to correctly compare getenforce output
All checks were successful
Nix Format Check / check-format (push) Successful in 38s

This commit is contained in:
Menno van Leeuwen 2025-01-15 11:48:06 +01:00
parent bbd3198976
commit 4d20f2d7a6
Signed by: vleeuwenmenno
SSH Key Fingerprint: SHA256:OJFmjANpakwD3F2Rsws4GLtbdz1TJ5tkQF0RZmF0TRE

View File

@ -418,7 +418,8 @@ check_selinux() {
return 0
fi
if [ -eq "$(getenforce)" "Enforcing" ]; then
# Check if getenforce is returning Enforcing
if [ "$(getenforce)" = "Enforcing" ]; then
log_warning "SELinux is enabled. Adjusting SELinux to permissive mode..."
sudo setenforce Permissive || die "Failed to disable SELinux"
tee /etc/selinux/config <<EOF