]> git.ipfire.org Git - ipfire-2.x.git/blob - src/initscripts/init.d/networking/red.up/99-geoip-database
Merge branch 'master' of ssh://git.ipfire.org/pub/git/ipfire-2.x into seventeen-geoip
[ipfire-2.x.git] / src / initscripts / init.d / networking / red.up / 99-geoip-database
1 #!/bin/bash
2
3 # Get the GeoIP database if no one exists yet.
4
5 DIR=/usr/share/xt_geoip
6
7 found=false
8
9 # Check if the directory contains any data.
10 for i in $DIR/*; do
11 found=true
12 break
13 done
14
15 # Download ruleset if none has been found.
16 if ! ${found}; then
17 /us/local/bin/xt_geoip_update >/dev/null 2>&1
18 fi
19
20 exit 0