mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-10-14 12:09:12 +00:00
Compare commits
3 commits
1d76a90ae5
...
f4c48cd3c0
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f4c48cd3c0 | ||
![]() |
79b8abe5fd | ||
![]() |
10af8ee01a |
1 changed files with 5 additions and 4 deletions
|
@ -14,6 +14,7 @@ while [ -h "$b_source" ]; do
|
|||
[[ $b_source != /* ]] && b_source="$b_dir/$b_source"
|
||||
done
|
||||
cur_dir="$(cd -P "$(dirname "$b_source")" && pwd)"
|
||||
script_name=$(basename "$0")
|
||||
|
||||
# Check command exist function
|
||||
_command_exists() {
|
||||
|
@ -63,7 +64,7 @@ arch() {
|
|||
armv6* | armv6) echo 'armv6' ;;
|
||||
armv5* | armv5) echo 'armv5' ;;
|
||||
s390x) echo 's390x' ;;
|
||||
*) rm -f ${cur_dir}/update.sh && _fail "Unsupported CPU architecture!" ;;
|
||||
*) echo -e "${red}Unsupported CPU architecture!${plain}" && rm -f "${cur_dir}/${script_name}" >/dev/null 2>&1 && exit 2;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
@ -128,7 +129,7 @@ update_x-ui() {
|
|||
echo -e "${yellow}Trying to fetch version with IPv4...${plain}"
|
||||
${wget_bin} --inet4-only -N -O /usr/local/x-ui-linux-$(arch).tar.gz https://github.com/MHSanaei/3x-ui/releases/download/${tag_version}/x-ui-linux-$(arch).tar.gz 2>/dev/null
|
||||
if [[ $? -ne 0 ]]; then
|
||||
_fail "ERROR: Failed to downloading x-ui, please be sure that your server can access GitHub"
|
||||
_fail "ERROR: Failed to download x-ui, please be sure that your server can access GitHub"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -191,7 +192,7 @@ update_x-ui() {
|
|||
echo -e "${yellow}Trying to fetch x-ui with IPv4...${plain}"
|
||||
${wget_bin} --inet4-only -O /usr/bin/x-ui https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.sh >/dev/null 2>&1
|
||||
if [[ $? -ne 0 ]]; then
|
||||
_fail "ERROR: Failed to downloading x-ui.sh script, please be sure that your server can access GitHub"
|
||||
_fail "ERROR: Failed to download x-ui.sh script, please be sure that your server can access GitHub"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -212,7 +213,7 @@ update_x-ui() {
|
|||
if [[ $? -ne 0 ]]; then
|
||||
${wget_bin} --inet4-only -O /etc/init.d/x-ui https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.rc >/dev/null 2>&1
|
||||
if [[ $? -ne 0 ]]; then
|
||||
_fail "ERROR: Failed to downloading startup unit x-ui.rc, please be sure that your server can access GitHub"
|
||||
_fail "ERROR: Failed to download startup unit x-ui.rc, please be sure that your server can access GitHub"
|
||||
fi
|
||||
fi
|
||||
chmod +x /etc/init.d/x-ui >/dev/null 2>&1
|
||||
|
|
Loading…
Reference in a new issue