On Thu, Aug 11, 2005 at 02:41:03PM -0700, Steve Witt wrote: > On Thu, 11 Aug 2005, Daniel McBrearty wrote: > > >Anyone using ddclient that knows how to configure it to run after reboot? > >At the moment I start it manually. I looked atthe deb policy manual > >about scripts to be added to /etc/init.d and the scripts that come > >with ddclient don't seem to fit (ddclient doesn't accept the start, > >stop and so on args). > >If I just have some arbitrary commands to be executed at > >startup/shutdown, where should I put them? is that the "good way"? > > ddclient isn't really a daemon so I don't think it is appropriate to run it > from /etc/init.d/... What you really want to do is trigger ddclient to run > when the IP address that you are assigned via DHCP from your ISP changes. This > could happen at reboot but also when the DHCP server's lease expires if you > don't reboot your machine a lot. > > I don't run ddclient, but do run something very similar, ipcheck, that does > basically the same thing. The machine I run this on is a server that is up > basically 24/7, it never is rebooted (unless something bad happens). What I do > is run ipcheck from a cron job once an hour. It checks the IP address, > determines if it changes and updates DynDNS if necessary. I think ddclient does > about the same thing. > > To run it at reboot, I would try to tie it in with the configuration of the > network interface. '/etc/network/interfaces' is where you have configured your > network interface to run DHCP and you can run arbitrary scripts/programs when > the interface goes up or down. You should be able to run ddclient when the > interface come up. See the man page on interfaces for the details. There are > various 'up' commands that allow you to run commands before or after the > network interface is brought up. ddclient can be set to run from cron, but if it runs as a daemon, why not? $ ps ax |grep [d]dclient 20871 ? S 243:48 /usr/bin/perl -w /usr/sbin/ddclient -daemon 10m -syslog -- Roberto C. Sanchez http://familiasanchez.net/~roberto
Attachment:
pgpOIyoIXh9UQ.pgp
Description: PGP signature