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:
2025-01-15 11:48:06 +01:00
parent bbd3198976
commit 4d20f2d7a6

View File

@@ -418,7 +418,8 @@ check_selinux() {
return 0 return 0
fi 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..." log_warning "SELinux is enabled. Adjusting SELinux to permissive mode..."
sudo setenforce Permissive || die "Failed to disable SELinux" sudo setenforce Permissive || die "Failed to disable SELinux"
tee /etc/selinux/config <<EOF tee /etc/selinux/config <<EOF