How To Check Whether SELinux is Enabled

1if sestatus | grep -i "SELinux status:" | grep -q "enabled"
2then
3    echo "SElinux is enabled"
4else
5    echo "SElinux is disabled"
6fi