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:
MHSanaei
2026-07-05 20:08:10 +02:00
parent 1bf9e5d544
commit b6d1caf95d
2 changed files with 11 additions and 6 deletions
+5 -3
View File
@@ -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
+6 -3
View File
@@ -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