networking/red.up/99-geoip-database: Fix empty folder check.

This commit is contained in:
Stefan Schantl
2015-03-07 22:39:32 +01:00
parent 663221a256
commit e24668f99a

View File

@@ -2,14 +2,17 @@
# Get the GeoIP database if no one exists yet.
DIR=/usr/share/xt_geoip
DIR="/usr/share/xt_geoip/*"
found=false
# Check if the directory contains any data.
for i in $DIR/*; do
found=true
break
for i in $DIR; do
# Ignore "." and ".."
if [ -d "$i" ]; then
found=true
break
fi
done
# Download ruleset if none has been found.