mirror of
https://github.com/routerich/RouterichAX3000_configs.git
synced 2025-12-06 03:26:43 +03:00
Check version sing-box and install version 1.11.15
This commit is contained in:
@@ -392,7 +392,44 @@ install_awg_packages
|
||||
checkPackageAndInstall "jq" "1"
|
||||
checkPackageAndInstall "curl" "1"
|
||||
checkPackageAndInstall "unzip" "1"
|
||||
checkPackageAndInstall "sing-box" "1"
|
||||
#checkPackageAndInstall "sing-box" "1"
|
||||
|
||||
###########
|
||||
manage_package "podkop" "enable" "stop"
|
||||
|
||||
PACKAGE="sing-box"
|
||||
REQUIRED_VERSION="1.11.15-1"
|
||||
|
||||
INSTALLED_VERSION=$(opkg list-installed | grep "^$PACKAGE" | cut -d ' ' -f 3)
|
||||
if [ -n "$INSTALLED_VERSION" ] && [ "$INSTALLED_VERSION" != "$REQUIRED_VERSION" ]; then
|
||||
echo "Version package $PACKAGE not equal $REQUIRED_VERSION. Removed packages..."
|
||||
opkg remove --force-removal-of-dependent-packages $PACKAGE
|
||||
fi
|
||||
|
||||
PACK_NAME="sing-box"
|
||||
AWG_DIR="/tmp/$PACK_NAME"
|
||||
SINGBOX_FILENAME="sing-box_1.11.15_openwrt_aarch64_cortex-a53.ipk"
|
||||
BASE_URL="https://github.com/SagerNet/sing-box/releases/download/v1.11.15/"
|
||||
DOWNLOAD_URL="${BASE_URL}${SINGBOX_FILENAME}"
|
||||
mkdir -p "$AWG_DIR"
|
||||
#echo $DOWNLOAD_URL
|
||||
|
||||
wget -O "$AWG_DIR/$SINGBOX_FILENAME" "$DOWNLOAD_URL"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "$PACK_NAME file downloaded successfully"
|
||||
else
|
||||
echo "Error downloading $PACK_NAME. Please, install $PACK_NAME manually and run the script again"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
opkg install "$AWG_DIR/$SINGBOX_FILENAME"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "$PACK_NAME file installing successfully"
|
||||
else
|
||||
echo "Error installing $PACK_NAME. Please, install $PACK_NAME manually and run the script again"
|
||||
exit 1
|
||||
fi
|
||||
###########
|
||||
|
||||
#проверяем установлени ли пакет dnsmasq-full
|
||||
if opkg list-installed | grep -q dnsmasq-full; then
|
||||
|
||||
Reference in New Issue
Block a user