Core90: Add GeoIP to update.

This commit is contained in:
Stefan Schantl
2015-04-16 20:37:00 +02:00
parent b8fe6ca756
commit 46d3a4cb16
5 changed files with 33 additions and 1 deletions

View File

@@ -159,6 +159,22 @@ if [ $BOOTSPACE -lt 1000 ]; then
esac
fi
# Create GeoIP related files if they do not exist yet.
if [ ! -e "/var/ipfire/firewall/geoipblock" ]; then
touch /var/ipfire/firewall/geoipblock
chown nobody:nobody /var/ipfire/firewall/geoipblock
# Insert default value into file.
echo "GEOIPBLOCK_ENABLED=off" >> /var/ipfire/firewall/geoipblock
fi
if [ ! -e "/var/ipfire/fwhosts/customgeoipgrp" ]; then
touch /var/ipfire/fwhosts/customgeoipgrp
chown nobody:nobody /var/ipfire/fwhosts/customgeoipgrp
fi
# Download/Update GeoIP databases.
/usr/local/bin/xt_geoip_update
# Update Language cache
perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"