Skip to content

Commit

Permalink
download GeoIP database w/o calling geoipupdate on CentOS
Browse files Browse the repository at this point in the history
  • Loading branch information
barrydegraaff committed May 2, 2018
1 parent be5c578 commit 74d1cc2
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions account-history-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,11 @@ fi
echo "Flushing Zimlet Cache."
su - zimbra -c "zmprov fc all"

set +e
echo "Updating GeoIP"
if [[ ! -z $APT_CMD ]]; then
cd $TMPFOLDER
wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
gunzip GeoLiteCity.dat.gz
mv GeoLiteCity.dat /usr/share/GeoIP/
else
# if no update is found, the script would not continue running in set -e
geoipupdate
fi
set -e
cd $TMPFOLDER
wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
gunzip GeoLiteCity.dat.gz
mv GeoLiteCity.dat /usr/share/GeoIP/

echo "Restoring config.properties"
cd $TMPFOLDER/upgrade/
Expand Down

0 comments on commit 74d1cc2

Please sign in to comment.