ddclient - Perl-based dynamic DNS client ChangeLog

HOWTO


# ddclient 3.8.0
# ==============
# Prerequisites:
# Perl >= 5.004

cd
test -f installed/ddclient-3.8.0.tar.bz2 &&
mv installed/ddclient-3.8.0.tar.bz2 .
test ! -f ddclient-3.8.0.tar.bz2 &&
wget http://downloads.sf.net/ddclient/ddclient-3.8.0.tar.bz2
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "ddclient-*" -exec rm -r {} \;
tar xjvf ~/ddclient-3.8.0.tar.bz2
cd ddclient-3.8.0
test $UID = 0 && chown -R root:root .

# Become root to install and configure it
su

# If you need SSL support
perl -MCPAN -e shell
install Bundle::CPAN
install IO::Socket::SSL
exit

# Install the script.  Use 'install', 'cp', or whatever you like.
install -m 0700 ddclient /usr/sbin/

# Back up your existing ddclient.conf if you have one
mkdir -p -m 0700 ~/backup &&
cp -a /etc/ddclient/ddclient.conf ~/backup/ddclient.conf-$(date +%Y%m%d)

# Create the necessary files and directories that it uses
test ! -d /etc/ddclient && mkdir -p -m 0700 /etc/ddclient
test ! -d /var/cache/ddclient && mkdir -p -m 0700 /var/cache/ddclient
install -m 0600 sample-etc_ddclient.conf /etc/ddclient/ddclient.conf.dist
test ! -f /etc/ddclient/ddclient.conf &&
install -m 0600 sample-etc_ddclient.conf /etc/ddclient/ddclient.conf

# There are several choices for how to run it.  You can run it from cron
# every so often.  Daemon-mode runs all the time, periodically checking to
# see if the IP address has changed.  You can set your DHCP client to
# run it manually each time your lease is updated.
#
# If you do set your DHCP client to handle it, you may want to also set a
# monthly cron job in case your lease doesn't change in a month, some
# services may expire you if you don't update it every so often.

# Open up /etc/ddclient/ddclient.conf in a text editor, change
# hostnames, logins, and passwords appropriately.
#
# This is an example of one used by a Linux machine who gets it's eth0
# IP assigned by dhcpcd or dhclient:
#daemon=300
#syslog=yes
#mail=root
#mail-failure=root
#pid=/var/run/ddclient.pid
#ssl=yes
#use=if, if=eth0
#login=yourusername
#password=yourpassword
#server=members.dyndns.org, \
#protocol=dyndns2 \
#jasoneng.dyndns.org

# If you are going to use it in daemon-mode and use the SysV-init type
# startup scripts (which recent Slackwares can do), and then start it
# manually:
install -m 0700 sample-etc_rc.d_init.d_ddclient /etc/rc.d/init.d/ddclient
( cd /etc/rc2.d ; ln -sf ../init.d/ddclient S65ddclient
  cd /etc/rc3.d ; ln -sf ../init.d/ddclient S65ddclient
  cd /etc/rc4.d ; ln -sf ../init.d/ddclient S65ddclient
  cd /etc/rc5.d ; ln -sf ../init.d/ddclient S65ddclient
  cd /etc/rc0.d ; ln -sf ../init.d/ddclient K35ddclient
  cd /etc/rc6.d ; ln -sf ../init.d/ddclient K35ddclient )
test -x /etc/rc.d/init.d/ddclient && /etc/rc.d/init.d/ddclient start

# If you use dhcpcd, configure it to update when you get a new/renewed
# lease.  Edit /etc/dhcpc/dhcpcd-eth0.exe to fine tune.  If the interface
# that you want to keep updated is not eth0, replace eth0 below with
# whatever it actually is.
cp sample-etc_dhcpc_dhcpcd-eth0.exe /etc/dhcpc/dhcpcd-eth0.exe

# If you use ISC DHCP's dhclient, configure it to update when you get a
# new/renewed lease.
cp sample-etc_dhclient-exit-hooks /etc/dhclient-exit-hooks

# If you will not be using daemon mode, here is a sample setup for cron.
# First set up retrying failed updates once an hour:
cat <<EOF > /etc/cron.hourly/ddclient
#!/bin/sh
/usr/sbin/ddclient -daemon=0 -syslog -quiet retry
EOF
chmod 700 /etc/cron.hourly/ddclient

# And also for cron, set it up to update twice per month.  Do this if you
# only update ddclient via your DHCP client, in case you don't get a new
# IP for a long time.  Some dynamic DNS providers (all?) will expire you
# if you don't update it every so often.
cat <<EOF > /etc/cron.monthly/ddclient
#!/bin/sh
/usr/sbin/ddclient -daemon=0 -syslog -quiet -force
EOF
chmod 700 /etc/cron.monthly/ddclient

# If you ever need to update it manually and you can't just do it via
# the provider's web site, do this, where 10.1.1.123 is your new IP:
#ddclient -daemon=0 -syslog -use=ip -ip=10.1.1.123

# Make sure your non-root user can remove the source later
chown -R $USER .
chmod -R u+w .

# Become yourself
exit

cd
mkdir -p -m 0700 installed
rm -f installed/ddclient-*.tar.*
mv ddclient-3.8.0.tar.bz2 installed/


# If you ever want to uninstall ddclient, this should do it:
cd
su
test -x /etc/rc.d/init.d/ddclient && /etc/rc.d/init.d/ddclient stop
rm -f /usr/sbin/ddclient /etc/cron.hourly/ddclient \
/etc/cron.monthly/ddclient /etc/rc.d/init.d/ddclient \
/etc/rc.d/rc?.d/*ddclient
test -d /etc/ddclient && rm -r /etc/ddclient
test -d /var/cache/ddclient && rm -r /var/cache/ddclient
exit
find ~/src -maxdepth 1 -type d -name "ddclient-*" -exec rm -r {} \;
rm -f ~/installed/ddclient-*.tar.*

List of HOWTOs

Web page itself last updated: 2023-12-20 8:06pm (EDT -0400)
HOWTO last updated: 2010-04-22 4:35pm
Copyright © 2001-2024 Jason Englander. All Rights reserved.
[HTML5]