summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-07-31 19:20:38 +0200
committerGitHub <noreply@github.com>2023-07-31 19:20:38 +0200
commitdf33f450b4e8b7e0286e36540de81edfb5f52e73 (patch)
treecbda7b6183ba303f0bcf3b2131311f4fb2227a4a /src
parent1ee3801de4fbc78bbb6cbd49719c855ec33f0f31 (diff)
parentbefd4045b59f6182591daa9f19702404791303ae (diff)
downloadvyos-1x-df33f450b4e8b7e0286e36540de81edfb5f52e73.tar.gz
vyos-1x-df33f450b4e8b7e0286e36540de81edfb5f52e73.zip
Merge pull request #2123 from nicolas-fort/T5406
T5406: webproxy op-mode command: add vrf support for blacklist update command
Diffstat (limited to 'src')
-rwxr-xr-xsrc/op_mode/webproxy_update_blacklist.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/op_mode/webproxy_update_blacklist.sh b/src/op_mode/webproxy_update_blacklist.sh
index 4fb9a54c6..05ea86f9e 100755
--- a/src/op_mode/webproxy_update_blacklist.sh
+++ b/src/op_mode/webproxy_update_blacklist.sh
@@ -45,6 +45,9 @@ do
--auto-update-blacklist)
auto="yes"
;;
+ --vrf)
+ vrf="yes"
+ ;;
(-*) echo "$0: error - unrecognized option $1" 1>&2; exit 1;;
(*) break;;
esac
@@ -76,7 +79,11 @@ fi
if [[ -n $update ]] && [[ $update -eq "yes" ]]; then
tmp_blacklists='/tmp/blacklists.gz'
- curl -o $tmp_blacklists $blacklist_url
+ if [[ -n $vrf ]] && [[ $vrf -eq "yes" ]]; then
+ sudo ip vrf exec $1 curl -o $tmp_blacklists $blacklist_url
+ else
+ curl -o $tmp_blacklists $blacklist_url
+ fi
if [ $? -ne 0 ]; then
echo "Unable to download [$blacklist_url]!"
exit 1