mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
networking/red.up/99-geoip-database: Fix empty folder check.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user