File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,13 +7,24 @@ DATE_SUFFIX=$(date +%Y-%m)
77URL=" https://download.db-ip.com/free/dbip-country-lite-${DATE_SUFFIX} .csv.gz"
88OUT_PATH=" /usr/share/vyos-geoip/dbip-country-lite.csv.gz"
99
10+ ASN_URL=" https://download.db-ip.com/free/dbip-asn-lite-${DATE_SUFFIX} .csv.gz"
11+ ASN_OUT_PATH=" /usr/share/vyos-geoip/dbip-asn-lite.csv.gz"
12+
1013mkdir -p $( dirname $OUT_PATH )
11- wget -O - $URL > $OUT_PATH
14+ curl -sSfL -o $OUT_PATH $URL
1215
1316if [ $? -ne 0 ]; then
14- echo " Failed to download GeoIP database"
17+ echo " Failed to download GeoIP country-code database"
1518 rm $OUT_PATH
1619fi
1720
21+ mkdir -p $( dirname $ASN_OUT_PATH )
22+ curl -sSfL -o $ASN_OUT_PATH $ASN_URL
23+
24+ if [ $? -ne 0 ]; then
25+ echo " Failed to download GeoIP ASN database"
26+ rm $ASN_OUT_PATH
27+ fi
28+
1829# Generate sqlite database
1930python3 /usr/libexec/vyos/geoip-update.py --init
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ usr/local/games/*
4545
4646# T5511: We do not need any caches on the system (will be recreated when needed).
4747# T7278: We need directory created by python3-cracklib for password checks
48+ # T7926: VyOS GeoIP database location
4849var/cache/!(cracklib|vyos)
4950
5051# T5511: We do not need any log-files on the system (will be recreated when needed).
You can’t perform that action at this time.
0 commit comments