red.up: Download / Update location database.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
Stefan Schantl
2019-12-09 14:59:26 +01:00
parent d1ca2d1fd5
commit 1eee696bb4
2 changed files with 6 additions and 20 deletions

View File

@@ -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

View File

@@ -0,0 +1,6 @@
#!/bin/bash
# Download / Check for updates of the location database.
/usr/local/bin/update-location-database
exit 0