#!/bin/bash
dir="/root/saseul_nodeip"
today=`date +'%Y-%m%d-%H%M'`
filename=saseul_${today}
ipset flush saseul_nodeip
curl http://49.247.40.227/peer | jq > ${dir}/${filename}
for i in $(cat ${dir}/${filename} |grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' |egrep -v "115.68.|49.247." |sort -u ); do ipset add saseul_nodeip $i ;done