mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-06 04:44:21 +00:00
fix(script): rename the Xray binary to xray-linux-arm32 on 32-bit ARM
The panel maps GOARCH=arm to "arm32" and launches bin/xray-linux-arm32, but install.sh/update.sh renamed the release tarball's binary (xray-linux-armv5/v6/v7) to xray-linux-arm. On armv7 boxes every update downloaded a fresh Xray core into a name the panel never executes, so an old correctly-named binary kept running forever, and a brand-new install had no launchable Xray binary at all. Rename to arm32 to match the panel (mtg stays plain "arm", matching internal/mtproto), and drop the stale misnamed xray-linux-arm during updates like the existing amd64 cleanup. Closes #5788
This commit is contained in:
+5
-3
@@ -1493,10 +1493,12 @@ install_x-ui() {
|
||||
chmod +x x-ui
|
||||
chmod +x x-ui.sh
|
||||
|
||||
# Check the system's architecture and rename the file accordingly
|
||||
# Check the system's architecture and rename the file accordingly.
|
||||
# The panel binary maps GOARCH=arm to "arm32" (internal/xray/process.go),
|
||||
# so the Xray binary must be named xray-linux-arm32; mtg keeps plain "arm".
|
||||
if [[ $(arch) == "armv5" || $(arch) == "armv6" || $(arch) == "armv7" ]]; then
|
||||
mv bin/xray-linux-$(arch) bin/xray-linux-arm
|
||||
chmod +x bin/xray-linux-arm
|
||||
mv bin/xray-linux-$(arch) bin/xray-linux-arm32
|
||||
chmod +x bin/xray-linux-arm32
|
||||
if [[ -f bin/mtg-linux-$(arch) ]]; then
|
||||
mv bin/mtg-linux-$(arch) bin/mtg-linux-arm
|
||||
chmod +x bin/mtg-linux-arm
|
||||
|
||||
@@ -1023,6 +1023,7 @@ update_x-ui() {
|
||||
rm ${xui_folder}/x-ui.sh -f > /dev/null 2>&1
|
||||
echo -e "${green}Removing old xray version...${plain}"
|
||||
rm ${xui_folder}/bin/xray-linux-amd64 -f > /dev/null 2>&1
|
||||
rm ${xui_folder}/bin/xray-linux-arm -f > /dev/null 2>&1
|
||||
echo -e "${green}Removing old README and LICENSE file...${plain}"
|
||||
rm ${xui_folder}/bin/README.md -f > /dev/null 2>&1
|
||||
rm ${xui_folder}/bin/LICENSE -f > /dev/null 2>&1
|
||||
@@ -1044,10 +1045,12 @@ update_x-ui() {
|
||||
fi
|
||||
chmod +x x-ui > /dev/null 2>&1
|
||||
|
||||
# Check the system's architecture and rename the file accordingly
|
||||
# Check the system's architecture and rename the file accordingly.
|
||||
# The panel binary maps GOARCH=arm to "arm32" (internal/xray/process.go),
|
||||
# so the Xray binary must be named xray-linux-arm32; mtg keeps plain "arm".
|
||||
if [[ $(arch) == "armv5" || $(arch) == "armv6" || $(arch) == "armv7" ]]; then
|
||||
mv bin/xray-linux-$(arch) bin/xray-linux-arm > /dev/null 2>&1
|
||||
chmod +x bin/xray-linux-arm > /dev/null 2>&1
|
||||
mv bin/xray-linux-$(arch) bin/xray-linux-arm32 > /dev/null 2>&1
|
||||
chmod +x bin/xray-linux-arm32 > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
chmod +x x-ui bin/xray-linux-$(arch) > /dev/null 2>&1
|
||||
|
||||
Reference in New Issue
Block a user