From 22cf278ce21c3e56bbf6876586affee5971f25c1 Mon Sep 17 00:00:00 2001 From: Hiradpi <78161225+Hiradpi@users.noreply.github.com> Date: Tue, 8 Aug 2023 22:18:00 +0330 Subject: [PATCH] add Arch Linux support to install.sh (#873) * Update install.sh Arch linux support added * Update install.sh --- README.md | 1 + install.sh | 19 +++++++++++++------ x-ui.sh | 2 ++ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c74ea6d2..edfb57f1 100644 --- a/README.md +++ b/README.md @@ -321,6 +321,7 @@ XUI_BIN_FOLDER="bin" XUI_DB_FOLDER="/etc/x-ui" go build main.go - Debian 10+ - CentOS 8+ - Fedora 36+ +- Arch Linux # Pictures diff --git a/install.sh b/install.sh index e439fd95..f1fd25e9 100644 --- a/install.sh +++ b/install.sh @@ -53,21 +53,28 @@ elif [[ "${release}" == "debian" ]]; then if [[ ${os_version} -lt 10 ]]; then echo -e "${red} Please use Debian 10 or higher ${plain}\n" && exit 1 fi +elif [[ "${release}" == "arch" ]]; then + echo "OS is ArchLinux" + else echo -e "${red}Failed to check the OS version, please contact the author!${plain}" && exit 1 fi install_base() { case "${release}" in - centos | fedora) - yum install -y -q wget curl tar - ;; - *) - apt install -y -q wget curl tar - ;; + centos|fedora) + yum install -y -q wget curl tar + ;; + arch) + pacman -Syu --noconfirm wget curl tar + ;; + *) + apt install -y -q wget curl tar + ;; esac } + # This function will be called when user installed x-ui out of sercurity config_after_install() { echo -e "${yellow}Install/update finished! For security it's recommended to modify panel settings ${plain}" diff --git a/x-ui.sh b/x-ui.sh index d0523e7f..a33795d6 100644 --- a/x-ui.sh +++ b/x-ui.sh @@ -54,6 +54,8 @@ elif [[ "${release}" == "debian" ]]; then if [[ ${os_version} -lt 10 ]]; then echo -e "${red} Please use Debian 10 or higher ${plain}\n" && exit 1 fi +elif [[ "${release}" == "arch" ]]; then + echo "OS is ArchLinux" fi