]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/initscripts/networking/red.up/99-geoip-database
unbound/red.up: run unbound update-forwarders after suricata init.
[people/pmueller/ipfire-2.x.git] / src / initscripts / networking / red.up / 99-geoip-database
CommitLineData
0909c0d1
SS
1#!/bin/bash
2
a3f4b8c6 3# Get the GeoIP database if no one exists yet
0909c0d1 4
a3f4b8c6
MT
5database_exists() {
6 local file
7 for file in /usr/share/xt_geoip/*.iv4; do
8 [ -e "${file}" ] && return 0
9 done
0909c0d1 10
a3f4b8c6
MT
11 # Does not exist
12 return 1
13}
0909c0d1
SS
14
15# Download ruleset if none has been found.
a3f4b8c6 16if ! database_exists; then
16cb6ae3 17 /usr/local/bin/xt_geoip_update >/dev/null 2>&1 &
0909c0d1
SS
18fi
19
20exit 0