modified: install.sh

This commit is contained in:
somebodywashere 2023-05-31 17:30:06 +00:00
parent 03ca18913d
commit 25dba2f28b

View file

@ -114,16 +114,16 @@ install_x-ui() {
exit 1
fi
echo -e "Got x-ui latest version: ${last_version}, beginning the installation..."
wget -N --no-check-certificate -O /usr/local/x-ui-linux-$(arch3xui).tar.gz https://github.com/MHSanaei/3x-ui/releases/download/${last_version}/x-ui-linux-$(arch3xui).tar.gz
wget -N --no-check-certificate -O /usr/local/x-ui-$(arch3xui).tar.gz https://github.com/MHSanaei/3x-ui/releases/download/${last_version}/x-ui-$(arch3xui).tar.gz
if [[ $? -ne 0 ]]; then
echo -e "${red}Downloading x-ui failed, please be sure that your server can access Github ${plain}"
exit 1
fi
else
last_version=$1
url="https://github.com/MHSanaei/3x-ui/releases/download/${last_version}/x-ui-linux-$(arch3xui).tar.gz"
url="https://github.com/MHSanaei/3x-ui/releases/download/${last_version}/x-ui-$(arch3xui).tar.gz"
echo -e "Begining to install x-ui $1"
wget -N --no-check-certificate -O /usr/local/x-ui-linux-$(arch3xui).tar.gz ${url}
wget -N --no-check-certificate -O /usr/local/x-ui-$(arch3xui).tar.gz ${url}
if [[ $? -ne 0 ]]; then
echo -e "${red}Download x-ui $1 failed,please check the version exists ${plain}"
exit 1
@ -134,8 +134,8 @@ install_x-ui() {
rm /usr/local/x-ui/ -rf
fi
tar zxvf x-ui-linux-$(arch3xui).tar.gz
rm x-ui-linux-$(arch3xui).tar.gz -f
tar zxvf x-ui-$(arch3xui).tar.gz
rm x-ui-$(arch3xui).tar.gz -f
cd x-ui
chmod +x x-ui bin/xray-linux-$(arch3xui)
cp -f x-ui.service /etc/systemd/system/