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