mirror of
https://github.com/Slava-Shchipunov/awg-openwrt.git
synced 2026-03-14 01:13:09 +00:00
fix: add opkg update run
This commit is contained in:
@@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
#set -x
|
#set -x
|
||||||
|
|
||||||
|
#Репозиторий OpenWRT должен быть доступен для установки зависимостей пакета kmod-amneziawg
|
||||||
|
check_repo() {
|
||||||
|
printf "\033[32;1mChecking OpenWrt repo availability...\033[0m\n"
|
||||||
|
opkg update | grep -q "Failed to download" && printf "\033[32;1mopkg failed. Check internet or date. Command for force ntp sync: ntpd -p ptbtime1.ptb.de\033[0m\n" && exit 1
|
||||||
|
}
|
||||||
|
|
||||||
install_awg_packages() {
|
install_awg_packages() {
|
||||||
# Получение pkgarch с наибольшим приоритетом
|
# Получение pkgarch с наибольшим приоритетом
|
||||||
PKGARCH=$(opkg print-architecture | awk 'BEGIN {max=0} {if ($3 > max) {max = $3; arch = $2}} END {print arch}')
|
PKGARCH=$(opkg print-architecture | awk 'BEGIN {max=0} {if ($3 > max) {max = $3; arch = $2}} END {print arch}')
|
||||||
@@ -159,6 +165,8 @@ configure_amneziawg_interface() {
|
|||||||
uci commit network
|
uci commit network
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_repo
|
||||||
|
|
||||||
install_awg_packages
|
install_awg_packages
|
||||||
|
|
||||||
printf "Do you want to configure the amneziawg interface? (y/n): "
|
printf "Do you want to configure the amneziawg interface? (y/n): "
|
||||||
|
|||||||
Reference in New Issue
Block a user