相続、親が弱ってきたら銀行の預金は親の面倒を見ているものが全て解約して管理すべきである、銀行は解約させない!!

asterisk BLACKLIST 定期更新

Asterisk
# vi /usr/local/bin/blacklist_update.sh
#!/bin/bash
cd /usr/local/bin

mv list.txt old_list.txt
old=$(wc -c < old_list.txt) wget http://voipbl.org/update -O - | sed -e '1d' > list.txt
new=$(wc -c < list.txt) if [[ $new > $old ]]
then
fwconsole stop
ipset flush BLACKLIST
for ip in $(cat list.txt); do ipset -A BLACKLIST $ip;done
ipset save < /etc/ipset.conf
reboot
else
echo "BLACKLISTは最新です"
fi

# chmod +x /usr/local/bin/blacklist_update.sh
# crontab -e
30 03 * * * /usr/local/bin/blacklist_update.sh
Asterisk
スポンサーリンク
シェアする
ふじやんをフォローする
スポンサーリンク
なんでもDIY

コメント