Check sing-box
This commit is contained in:
21
install.sh
21
install.sh
@@ -11,6 +11,7 @@ mkdir -p "$DOWNLOAD_DIR"
|
|||||||
|
|
||||||
main() {
|
main() {
|
||||||
check_system
|
check_system
|
||||||
|
sing_box
|
||||||
|
|
||||||
wget -qO- "$REPO" | grep -o 'https://[^"[:space:]]*\.ipk' | while read -r url; do
|
wget -qO- "$REPO" | grep -o 'https://[^"[:space:]]*\.ipk' | while read -r url; do
|
||||||
filename=$(basename "$url")
|
filename=$(basename "$url")
|
||||||
@@ -68,8 +69,15 @@ main() {
|
|||||||
add_tunnel
|
add_tunnel
|
||||||
fi
|
fi
|
||||||
|
|
||||||
opkg install $DOWNLOAD_DIR/podkop*.ipk
|
until opkg install $DOWNLOAD_DIR/podkop*.ipk; do
|
||||||
opkg install $DOWNLOAD_DIR/luci-app-podkop*.ipk
|
echo "Install error. Repeat"
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
until opkg install $DOWNLOAD_DIR/luci-app-podkop*.ipk; do
|
||||||
|
echo "Install error. Repeat"
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
echo "Русский язык интерфейса ставим? y/n (Need a Russian translation?)"
|
echo "Русский язык интерфейса ставим? y/n (Need a Russian translation?)"
|
||||||
while true; do
|
while true; do
|
||||||
@@ -403,4 +411,13 @@ check_system() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sing_box() {
|
||||||
|
sing_box_version=$(sing-box version | head -n 1 | awk '{print $3}')
|
||||||
|
required_version="1.11.1"
|
||||||
|
|
||||||
|
if [ "$(echo -e "$sing_box_version\n$required_version" | sort -V | head -n 1)" != "$required_version" ]; then
|
||||||
|
opkg remove sing-box
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
main
|
main
|
||||||
Reference in New Issue
Block a user