diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 98376e76..56960d24 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -939,8 +939,8 @@ updatePihole() { checkSelinux() { if [ -x "$(command -v getenforce)" ]; then printf "\n::: SELinux Support Detected.." - getenforce | grep 'Enforcing' - if [ $? -eq 0 ]; then + enforceMode=$(getenforce) + if [[ "${enforceMode}" == "Enforcing" ]]; then if (whiptail --title "SELinux Detected" --yesno "SELinux is being Enforced on your system!\n\nPi-hole currently does not support SELinux, but you may still continue with the installation.\n\nNote: Admin UI Will not function fully without setting your policies correctly\n\nContinue installing Pi-hole?" ${r} ${c}); then printf "\n::: Continuing installation with SELinux Enforcing.." printf "\n::: Please refer to official SELinux documentation to create a custom policy."