From b681aac3c2e7b8597ccd14635f001c57ac5422cf Mon Sep 17 00:00:00 2001 From: Stan Grishin Date: Fri, 26 Feb 2021 02:16:59 +0000 Subject: [PATCH] vpn-policy-routing: update user netflix file Signed-off-by: Stan Grishin --- .../files/vpn-policy-routing.netflix.user | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/net/vpn-policy-routing/files/vpn-policy-routing.netflix.user b/net/vpn-policy-routing/files/vpn-policy-routing.netflix.user index bffb6a6d15..5747cd6799 100644 --- a/net/vpn-policy-routing/files/vpn-policy-routing.netflix.user +++ b/net/vpn-policy-routing/files/vpn-policy-routing.netflix.user @@ -25,11 +25,7 @@ if [ ! -s "$TARGET_FNAME" ]; then if [ "$DB_SOURCE" = "api.bgpview.io" ]; then TARGET_URL="https://api.bgpview.io/asn/${TARGET_ASN}/prefixes" - if command -v jq >/dev/null 2>&1; then - curl -s "$TARGET_URL" 2>/dev/null | jq -r '.data.ipv4_prefixes[].prefix' > "$TARGET_FNAME" - else - curl -s "$TARGET_URL" 2>/dev/null | sed -ne 's/.*"ipv4_prefixes":\(.*\),"ipv6_prefixes":.*/\1\n/g; s/\}\},/&\n/g; s/"parent":{"prefix":/"parent":{"parent_prefix":/gp' | sed -ne 's/.*"prefix":"\(.\{0,20\}\)",".*/\1/g; s/\\//gp' > "$TARGET_FNAME" - fi + curl -s "$TARGET_URL" 2>/dev/null | jsonfilter -e '@.data.ipv4_prefixes[*].prefix' fi fi -- 2.30.2