10 月 26, 2008 • Tags: , , • Posted in: DNS

DDNSの設定

DiCE DynamicDNS Client DNSサーバは無償のZoneEditを利用している。
グローバルIPの変化に対応するため、「ZoneEdit 独自ドメイン用 DiCE 設定」を参考にDiCE Linux版を導入した。

自動起動できるように、サービス起動スクリプトを作成してみた。

間違いがあるかもしれないので、気づいたら教えてください。

/etc/init.d/diced

#!/bin/bash
#
# chkconfig: - 91 35
# description: Starts and stops diced \
# used to update ddns.
# Source function library.
. /etc/init.d/functions
prog=$"diced"

# DiCE program
DICE=/usr/local/dice/DiCE/diced

start() {
echo -n $"Starting $prog: "
daemon ${DICE} -d -l &
echo
}

stop() {
echo -n $"Shutting down $prog: "
killproc diced
echo
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0

OS起動時に、サービスが自動起動するように設定
# chkconfig --add diced
# chkconfig diced on
# chkconfig --list diced
diced           0:off   1:off   2:on    3:on    4:on    5:on    6:off
# service diced start
Starting diced: =-=-=- DiCE DynamicDNS Client -=-=-=
Version 0.19 for Japanese
Copyright(c) 2001 sarad
DiCE Daemon Started !!                                      [  OK  ]

Leave a Reply

You must be logged in to post a comment.