From 51f2b2b145f7a39d084c1a8300bda5a3b0b32790 Mon Sep 17 00:00:00 2001 From: Menno van Leeuwen Date: Mon, 10 Mar 2025 15:11:15 +0100 Subject: [PATCH] feat: add check for SELinux presence and log message if not found --- setup.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup.sh b/setup.sh index 3ae04cf..5abc41b 100755 --- a/setup.sh +++ b/setup.sh @@ -229,6 +229,12 @@ check_selinux() { return 0 fi + # Check if getenforce exists, if not it means we don't have SELinux + if ! command -v getenforce >/dev/null 2>&1; then + log_success "SELinux not found. Skipping..." + return 0 + fi + # Check if getenforce is returning Enforcing if [ "$(getenforce)" = "Enforcing" ]; then log_warning "SELinux is enabled. Adjusting SELinux to permissive mode..."