Versioner sammenlignet

Nøgle

  • Linjen blev tilføjet.
  • Denne linje blev fjernet.
  • Formatering blev ændret.

...

 Blocking (a part of) IP-Addresses from CN -China, RU -Russia

And a short script to update the file:

Kodeblok
titlegetFile.sh
#!/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