CDMon Updater

This is just another CDMon client to update dynamic DNS. It’s written in Ruby and built as a gem. The main goal for this client is to support multiple users and to provide a flexible configuration.

INSTALL

You can install it as a gem doing

sudo gem sources -a http://gems.github.com #only if you haven't done this before
sudo gem install kandalf-cdmon_updater

Or you can clone the repository from git://github.com/kandalf/cdmon_updater.git and put bin/cdmon_updater somewhere in your PATH.

After the installation you should create the file /etc/cdmon.yml with a structure like this:

general:

dns:          dinamic1.cdmon.net
email:        root@server
log_level:    DEBUG
service_url:  https://dinamico.cdmon.org/onlineService.php
send_mail_on_error: no

users:

cdmon_user:
  hosts: kandalf.com.ar blog.kandalf.com.ar
  md5pass: 1278323gfb37875f2749ju6cabd8io89

mailer:

address: relay.someserver.com.ar
port: 25
domain: kandalf.com.ar
user_name: someuser #without @domain
password: plain_password

You should customize the users section with your personal data. The cdmon_user should be replaced with the user you have associated in your CDMon control panel with your domains. As you can have multiple users in CDMon, you can add as many user sections as you need here. The md5pass should be the user’s password crypted as an MD5 hash, CDMon provides a website to do this ( www.cdmon.com/webapps/encriptar.php ) but you can use the method you like as long as it results on the MD5 hash for your passowrd.

For mail notification you must activate the the send_mail_on_error feature on the general section and properly config your mail server. Also, you have to define a valid email address for the email feature on the general section.

When these things are set up, an email will be sent to the email address defined on the general section with the message of the error and the time it was raised and the subject of "CDMon Updater ERROR".

From the general section you should customize the log_level and the email (which is not yet supported but it will be soon).

After you have your settings, you can run the client manually or you can add the following line to your crontab

0/3 * * * * /usr/bin/cdmon_updater

For it to run every 3 minutes.