Skip site navigation (1)Skip section navigation (2)
Date:      26 Aug 2004 17:04:22 -0400
From:      Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
To:        Olof Andersson <olof.a@home.se>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Startup with no-ip
Message-ID:  <441xht1ui1.fsf@be-well.ilk.org>
In-Reply-To: <65BA0DD3-F79D-11D8-A246-0003930BAE38@home.se>
References:  <65BA0DD3-F79D-11D8-A246-0003930BAE38@home.se>

next in thread | previous in thread | raw e-mail | index | archive | help
Olof Andersson <olof.a@home.se> writes:

> Hi!
> 
> I have problems getting noip to start automatically at startup. I'm a
> beginner at FreeBSD and Unix and I need help with this. I added some
> info from my system that I hope will be usefull. noip works fine when
> manually started.

[snip[

>              su -m noip -c '/usr/local/bin/noip2' 2> /dev/null > /dev/null

I suspect that you wanted:
              su -m noip -c '/usr/local/bin/noip2' 2>&1 >/dev/null

but I suggest not running the updater as a daemon at all.

I have the dhcp client run it automatically when the address changes,
by creating /etc/dhclient-exit-hooks as follows:

  #!/bin/sh

  updater_prog = /usr/local/bin/noip2 
  if [ x$reason = xREBOOT ]   || 	\
     [ x$old_ip_address = x ] || 	\
     [ x$old_ip_address != x$new_ip_address ]; then
      if [ -x $updater_prog ]; then 
          ${updater_prog} -i "$new_ip_address"
      else
          logger "dhclient-exit-hooks cannot find updater $updater_prog"
      fi
  fi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?441xht1ui1.fsf>