Skip to content

Commit

Permalink
add Arch Linux support to install.sh (#873)
Browse files Browse the repository at this point in the history
* Update install.sh

Arch linux support added

* Update install.sh
  • Loading branch information
Hiradpi authored and MHSanaei committed Aug 8, 2023
1 parent 5ab5986 commit 22cf278
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
19 changes: 13 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
2 changes: 2 additions & 0 deletions x-ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 22cf278

Please sign in to comment.