Skip to content

Commit

Permalink
check which file exists
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Hansson <[email protected]>
  • Loading branch information
enoch85 authored Sep 22, 2024
1 parent 7c222dc commit f030a55
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions network/geoblock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,19 @@ fi
cat << GEOBLOCKCONF_CREATE > "$GEOBLOCK_MOD_CONF"
<IfModule mod_maxminddb.c>
MaxMindDBEnable On
MaxMindDBFile DB $GEOBLOCK_DIR/GeoLite2-Country.mmdb
MaxMindDBEnv MM_CONTINENT_CODE DB/continent/code
MaxMindDBEnv MM_COUNTRY_CODE DB/country/iso_code
# Check for IPinfo mmdb
<IfFile "$GEOBLOCK_DIR/IPInfo-Country.mmdb">
MaxMindDBFile DB $GEOBLOCK_DIR/IPInfo-Country.mmdb
MaxMindDBEnv MM_CONTINENT_CODE DB/continent
MaxMindDBEnv MM_COUNTRY_CODE DB/country
</IfFile>
# Check for Maxmind mmdb
<IfFile "$GEOBLOCK_DIR/GeoLite2-Country.mmdb">
MaxMindDBFile DB $GEOBLOCK_DIR/GeoLite2-Country.mmdb
MaxMindDBEnv MM_CONTINENT_CODE DB/continent/code
MaxMindDBEnv MM_COUNTRY_CODE DB/country/iso_code
</IfFile>
</IfModule>
# Geoblock rules
Expand Down

0 comments on commit f030a55

Please sign in to comment.