複数のドメイン更新をまとめる(メモ書き)
1ドメインごとにスクリプトを書くのは面倒なので1つにまとめる。
障害のときのために2ドメイン以上(別事業者)は取得しておいたほうがいいと思う。
DDNS事業者の問題かプロバイダ以内(自宅ネットワーク側)の問題かを切り分けるために。
以下、サンプルスクリプト。
#!/bin/sh # ##DDNS updata script. ## ## # # ### configure of this script ### #which wget wget=/usr/bin/wget ### script text from here. ### #check wget if ! [ -x $wget ] then echo "Not found : wget"; exit 1 fi #updata DDNS #value-domain.com $wget -q -O - 'http://dyn.value-domain.com/cgi-bin/dyn.fcg?d=[yourdomein]&p=[passwd]&h=*&i=' | \ grep -v "status=0" | grep -v "OK" sleep 1 #ddo.jp $wget -q -O - 'http://free.ddo.jp/dnsupdate.php?dn=[yourname]&pw=[passwd]' | \ grep "[yourname]" | grep -v "SUCCESS" sleep 1 exit 0ここまで
戻るなら押せ!