diff --git a/ruantiblock/Makefile b/ruantiblock/Makefile index 72e6dce..550bd4c 100644 --- a/ruantiblock/Makefile +++ b/ruantiblock/Makefile @@ -17,7 +17,7 @@ define Package/$(PKG_NAME) TITLE:=Ruantiblock URL:=https://github.com/gSpotx2f/ruantiblock_openwrt PKGARCH:=all - DEPENDS:=+wget +dnsmasq-full + DEPENDS:=+dnsmasq-full endef define Package/$(PKG_NAME)/description diff --git a/ruantiblock/files/usr/bin/ruantiblock b/ruantiblock/files/usr/bin/ruantiblock index f58a70c..63d840e 100644 --- a/ruantiblock/files/usr/bin/ruantiblock +++ b/ruantiblock/files/usr/bin/ruantiblock @@ -302,16 +302,19 @@ AddNftSets() { } UpdateBllistSets() { + local _return_code=0 if [ -f "$IP_DATA_FILE" ]; then echo " Updating nft sets..." $NFT_CMD -f "$IP_DATA_FILE" - if [ $? -eq 0 ]; then + _return_code=$? + if [ $_return_code -eq 0 ]; then echo " Ok" else echo " Error! Nft set wasn't updated" >&2 MakeLogRecord "err" "Error! Nft set wasn't updated" fi fi + return $_return_code } AddNftRules() { @@ -525,6 +528,7 @@ Update() { FlushNftSets "$NFTSET_CIDR_USER" "$NFTSET_IP_USER" fi UpdateBllistSets + _return_code=$? DnsmasqRestart ToggleUPIDFile del fi @@ -551,6 +555,7 @@ Start() { SetNetConfig PreStartCheck UpdateBllistSets + _return_code=$? ### Start-script [ -x "$START_SCRIPT" ] && $START_SCRIPT > /dev/null 2>&1 & fi