From ead48d8ea225d9d0837607d4e5f280941d072d69 Mon Sep 17 00:00:00 2001 From: gjmzj Date: Wed, 23 Aug 2023 20:59:48 +0800 Subject: [PATCH] fix disable selinux on deploy host --- ezdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ezdown b/ezdown index 8f1608d..49551dd 100755 --- a/ezdown +++ b/ezdown @@ -240,8 +240,8 @@ ${c} EOF fi - if [[ -e /etc/centos-release || -e /etc/redhat-release ]]; then - logger debug "turn off selinux in CentOS/Redhat" + if [[ -f /etc/selinux/config ]]; then + logger debug "turn off selinux on host" getenforce|grep Disabled || setenforce 0 sed -i 's/^SELINUX=.*$/SELINUX=disabled/g' /etc/selinux/config fi