Sidehistorik
...
And a short script to update the file (via /etc/crontab):
| Kodeblok | ||
|---|---|---|
| ||
#!/bin/bash
cd /data/haproxy
cp haproxy_geo_ip.txt haproxy_geo_ip.txt.1
cd /data/haproxy/tmp
rm haproxy_geo_ip.txt
wget https://wetmore.ca/ip/haproxy_geo_ip.txt
if [ $? -eq 0 ]
then
if [ -s haproxy_geo_ip.txt ]
then
cp haproxy_geo_ip.txt /data/haproxy
fi
fi |
...