Update x-ui.sh

Fix  Fedora OS Support
This commit is contained in:
Leonardo 2023-03-07 20:23:11 +03:30 committed by GitHub
parent 97f36448a1
commit c734bea230
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,14 +41,13 @@ else
LOGE "check system OS failed,please contact with author! \n" && exit 1 LOGE "check system OS failed,please contact with author! \n" && exit 1
fi fi
# os version
os_version="" os_version=""
os_version=$(grep -i version_id /etc/os-release | cut -d \" -f2 | cut -d . -f1) os_version=$(grep -i version_id /etc/os-release | cut -d \" -f2 | cut -d . -f1)
if [[ x"${release}" == x"centos" ]]; then if [[ x"${release}" == x"centos" ]]; then
if [[ ${os_version} -le 6 ]]; then if [[ ${os_version} -le 7 ]]; then
LOGE "please use CentOS 7 or higher version! \n" && exit 1 echo -e "${red} Please use CentOS 8 or higher ${plain}\n" && exit 1
fi fi
elif [[ x"${release}" == x"ubuntu" ]]; then elif [[ x"${release}" == x"ubuntu" ]]; then
if [[ ${os_version} -lt 16 ]]; then if [[ ${os_version} -lt 16 ]]; then