Re: ddclient startup script problems - fixed!
"Thomas Adam" <thomas_adam16@yahoo.com> wrote in message
news:1Q0T8-i2-19@gated-at.bofh.it...
> --- Dave <dave_dyck@yahoo.ca> wrote:
>
> > Yes I'm running it as root. When I type "/etc/init.d/ddclient start" at
> > the
> > prompt when logged in as root, nothing happens. "ps aux" does not show
> > ddclient as running. On the other hand, if I only type "ddclient start"
> > at
> > the prompt, it starts up.
>
> That makes no sense, unless the ddclient program accepts 'start' as valid
> parameter. I would be inclined to trace the execution of the
> /etc/init.d/ddclient script. Add:
>
> set -xv
>
> below the hash-bang line (the line that starts: #!/bin/sh)
>
> Then run the script, and paste the output back to the list.
>
beta:/# /etc/init.d/ddclient start
#
# init script for the dynamic DNS service update utility: ddclient
PATH=/sbin:/bin:/usr/sbin:/usr/bin
+ PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/ddclient
+ DAEMON=/usr/sbin/ddclient
NAME="ddclient"
+ NAME=ddclient
DESC="dynamic DNS service update utility"
+ DESC=dynamic DNS service update utility
# Don't run if not installed
test -f $DAEMON || exit 0
+ test -f /usr/sbin/ddclient
# Evaluate the config for the Debian scripts
run_daemon=true
+ run_daemon=true
daemon_interval=300
+ daemon_interval=300
if [ -f /etc/default/ddclient ]; then
. /etc/default/ddclient
fi
+ '[' -f /etc/default/ddclient ']'
+ . /etc/default/ddclient
# Configuration for ddclient scripts
# generated from debconf on Thu Mar 4 20:01:07 CST 2004
#
# /etc/default/ddclient
# Set to "true" if ddclient should be run every time a new ppp connection is
# established. This might be useful, if you are using dial-on-demand
run_ipup="true"
++ run_ipup=true
# Set to "true" if ddclient should run in daemon mode
run_daemon="false"
++ run_daemon=false
[...SNIP...]
+ '[' false '!=' true ']'
+ exit 0
beta:/# ps aux |grep ddclient
root 3020 0.0 0.0 1540 452 pts/0 S 12:36 0:00 grep ddclient
beta:/#
Found my problem...false != true. I didn't pay attention to the fact that
the script was calling /etc/default/ddclient (I thought it was only using
/etc/ddclient.conf). Went in and changed "run_daemon=true" and everything
works great. Thanks for all the help (especially for highlighting the
"set -xv" command!).
Dave
Reply to: