From 5464fb3424701364255cbcb8e3687efe822aa2ac Mon Sep 17 00:00:00 2001 From: Fazilov Kamil Date: Fri, 15 May 2026 13:48:14 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20fa?= =?UTF-8?q?llback=20=D0=BD=D0=B0=20=D1=81=D0=BB=D1=83=D1=87=D0=B0=D0=B9=20?= =?UTF-8?q?=D0=B5=D1=81=D0=BB=D0=B8=20=D0=BD=D0=B5=20=D1=85=D0=B2=D0=B0?= =?UTF-8?q?=D1=82=D0=B0=D0=B5=D1=82=20=D0=B7=D0=B0=D0=B2=D0=B8=D1=81=D0=B8?= =?UTF-8?q?=D0=BC=D0=BE=D1=81=D1=82=D0=B5=D0=B9=20=D1=87=D0=B5=D1=80=D0=B5?= =?UTF-8?q?=D0=B7=20opkg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- getconfig.sh | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/getconfig.sh b/getconfig.sh index cef7cf0..d3ec24a 100644 --- a/getconfig.sh +++ b/getconfig.sh @@ -57,10 +57,22 @@ else echo "Downloading: ${SINGBOX_IPK_URL}" if wget -O "$SINGBOX_IPK_TMP" "$SINGBOX_IPK_URL"; then - opkg install --force-reinstall "$SINGBOX_IPK_TMP" - rm -f "$SINGBOX_IPK_TMP" - SINGBOX_UPGRADED=1 - echo "sing-box installed from direct ipk." + if opkg install --force-reinstall "$SINGBOX_IPK_TMP"; then + echo "sing-box installed from direct ipk." + rm -f "$SINGBOX_IPK_TMP" + SINGBOX_UPGRADED=1 + else + echo "opkg install failed (dependency issue?). Extracting binary manually..." + tar -xzf "$SINGBOX_IPK_TMP" -C /tmp + tar -xzf /tmp/data.tar.gz -C /tmp + if cp /tmp/usr/bin/sing-box /usr/bin/sing-box && chmod +x /usr/bin/sing-box; then + SINGBOX_UPGRADED=1 + echo "sing-box installed successfully from manual binary extraction." + else + echo "ERROR: Failed to copy sing-box binary." + fi + rm -rf /tmp/usr /tmp/data.tar.gz /tmp/debian-binary "$SINGBOX_IPK_TMP" + fi else echo "ERROR: Failed to download sing-box ipk. Manual installation may be required." fi