mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-16 14:03:00 +02:00
red.up: Download / Update location database.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Get the GeoIP database if no one exists yet
|
||||
|
||||
database_exists() {
|
||||
local file
|
||||
for file in /usr/share/xt_geoip/*.iv4; do
|
||||
[ -e "${file}" ] && return 0
|
||||
done
|
||||
|
||||
# Does not exist
|
||||
return 1
|
||||
}
|
||||
|
||||
# Download ruleset if none has been found.
|
||||
if ! database_exists; then
|
||||
/usr/local/bin/xt_geoip_update >/dev/null 2>&1 &
|
||||
fi
|
||||
|
||||
exit 0
|
||||
6
src/initscripts/networking/red.up/99-location-database
Normal file
6
src/initscripts/networking/red.up/99-location-database
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Download / Check for updates of the location database.
|
||||
/usr/local/bin/update-location-database
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user