LoginSignup
7
11

More than 5 years have passed since last update.

シンプルだけどIP変更チェック付きのValue DomainのDDNSアップデートスクリプト

Last updated at Posted at 2013-09-14

シェルスクリプトじゃなかったり、複数ホスト対応などの不要な機能があるものが多かったので、自分で作っちゃいました。

インストール

とりあえず落として、設定ファイルを書きます。

wget 'https://gist.github.com/ypresto/6559955/raw/  d6386d44483a291a2899e935c7c6b440c7e8716d/update-ddns'
chmod +x ./update-ddns

wget 'https://gist.github.com/ypresto/6559955/raw/8135fba20f0ea9d23165c553b177156246f73dfb/update-ddns.conf'
chmod 600 ./update-ddns.conf

お好きなエディタで./update-ddns.confを編集してください。
下記の内容を記述します。

  • DOMAIN=:契約しているドメイン名(hogefuga.com)
  • PASSWORD=:Value Domainで設定したDDNS専用パスワード
  • HOST=:アップデートしたいホスト名(www2)

最後に下記を実行してインストールします。

sudo chown root:root ./update-ddns ./update-ddns.conf
sudo mv ./update-ddns.conf /etc/
sudo mv ./update-ddns /etc/cron.hourly/

1時間ごとに実行されますが、IPが変更されていた時のみ更新するので、負荷は最小限に留められます。

Happy DDNS hacking!

7
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
11