|
@@ -81,19 +81,21 @@ fi
|
|
|
|
|
|
install_base() {
|
|
install_base() {
|
|
case "${release}" in
|
|
case "${release}" in
|
|
- centos|fedora|almalinux|rocky)
|
|
|
|
- yum -y update && yum install -y -q wget curl tar
|
|
|
|
- ;;
|
|
|
|
- arch|manjaro)
|
|
|
|
- pacman -Syu && pacman -Syu --noconfirm wget curl tar
|
|
|
|
- ;;
|
|
|
|
- *)
|
|
|
|
- apt-get update && apt install -y -q wget curl tar
|
|
|
|
- ;;
|
|
|
|
|
|
+ centos | almalinux | rocky)
|
|
|
|
+ yum -y update && yum install -y -q wget curl tar
|
|
|
|
+ ;;
|
|
|
|
+ fedora)
|
|
|
|
+ dnf -y update && dnf install -y -q wget curl tar
|
|
|
|
+ ;;
|
|
|
|
+ arch | manjaro)
|
|
|
|
+ pacman -Syu && pacman -Syu --noconfirm wget curl tar
|
|
|
|
+ ;;
|
|
|
|
+ *)
|
|
|
|
+ apt-get update && apt install -y -q wget curl tar
|
|
|
|
+ ;;
|
|
esac
|
|
esac
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
# This function will be called when user installed x-ui out of security
|
|
# This function will be called when user installed x-ui out of security
|
|
config_after_install() {
|
|
config_after_install() {
|
|
echo -e "${yellow}Install/update finished! For security it's recommended to modify panel settings ${plain}"
|
|
echo -e "${yellow}Install/update finished! For security it's recommended to modify panel settings ${plain}"
|
|
@@ -167,11 +169,10 @@ install_x-ui() {
|
|
|
|
|
|
# Check the system's architecture and rename the file accordingly
|
|
# Check the system's architecture and rename the file accordingly
|
|
if [[ $(arch3xui) == "armv5" || $(arch3xui) == "armv6" || $(arch3xui) == "armv7" ]]; then
|
|
if [[ $(arch3xui) == "armv5" || $(arch3xui) == "armv6" || $(arch3xui) == "armv7" ]]; then
|
|
-
|
|
|
|
- mv bin/xray-linux-$(arch3xui) bin/xray-linux-arm
|
|
|
|
- chmod +x bin/xray-linux-arm
|
|
|
|
|
|
+ mv bin/xray-linux-$(arch3xui) bin/xray-linux-arm
|
|
|
|
+ chmod +x bin/xray-linux-arm
|
|
fi
|
|
fi
|
|
-
|
|
|
|
|
|
+
|
|
chmod +x x-ui bin/xray-linux-$(arch3xui)
|
|
chmod +x x-ui bin/xray-linux-$(arch3xui)
|
|
cp -f x-ui.service /etc/systemd/system/
|
|
cp -f x-ui.service /etc/systemd/system/
|
|
wget --no-check-certificate -O /usr/bin/x-ui https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.sh
|
|
wget --no-check-certificate -O /usr/bin/x-ui https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.sh
|
|
@@ -201,7 +202,6 @@ install_x-ui() {
|
|
echo -e "----------------------------------------------"
|
|
echo -e "----------------------------------------------"
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
echo -e "${green}Running...${plain}"
|
|
echo -e "${green}Running...${plain}"
|
|
install_base
|
|
install_base
|
|
install_x-ui $1
|
|
install_x-ui $1
|