modified: README.md

modified:   install.sh
This commit is contained in:
Hai HUANG 2024-02-29 18:15:23 +08:00
parent d6cd0611d4
commit b3b24163c4
2 changed files with 19 additions and 6 deletions

View file

@ -21,7 +21,7 @@
## Install & Upgrade
```
bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh)
bash <(curl -Ls https://raw.githubusercontent.com/maple367/3x-ui/main/install.sh)
```
## Install Custom Version

View file

@ -74,7 +74,8 @@ elif [[ "${release}" == "manjaro" ]]; then
echo "Your OS is Manjaro"
elif [[ "${release}" == "armbian" ]]; then
echo "Your OS is Armbian"
elif [[ "${release}" == "alpine" ]]; then
echo "Your OS is Alpine"
else
echo -e "${red}Failed to check the OS version, please contact the author!${plain}" && exit 1
fi
@ -90,6 +91,9 @@ install_base() {
arch | manjaro)
pacman -Syu && pacman -Syu --noconfirm wget curl tar tzdata
;;
alpine)
apk update && apk add wget curl tar tzdata
;;
*)
apt-get update && apt install -y -q wget curl tar tzdata
;;
@ -158,7 +162,11 @@ install_x-ui() {
fi
if [[ -e /usr/local/x-ui/ ]]; then
if release="alpine"; then
service x-ui stop
else
systemctl stop x-ui
fi
rm /usr/local/x-ui/ -rf
fi
@ -180,9 +188,14 @@ install_x-ui() {
chmod +x /usr/bin/x-ui
config_after_install
if release="alpine"; then
rc-update add x-ui boot
rc-service x-ui start
else
systemctl daemon-reload
systemctl enable x-ui
systemctl start x-ui
fi
echo -e "${green}x-ui ${last_version}${plain} installation finished, it is running now..."
echo -e ""
echo -e "x-ui control menu usages: "