Hello,
This is script auto update library Maxmind using sh file:
This is script auto update library Maxmind using sh file:
- Create new sh file:
- Create blank text file: E.G. updateGeoIP
- Run command line: sudo chmod +x updateGeoIP
- Copy this script to sh file:
- #!/bin/sh
pathGeoIP="/usr/share/GeoIP"
urlGeoIP="http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz"urlGeoIPv6="http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz"
cd $pathGeoIP && wget $urlGeoIP && gzip -d -f "GeoIP.dat.gz"cd $pathGeoIP && wget $urlGeoIPv6 && gzip -d -f "GeoIPv6.dat.gz"
- Create crontab:
- crontab -e
- Update new cron for this script: E.G. 1 1 10 * * sh /home/tools/updateGeoIp
Done!
No comments:
Post a Comment