anchor.diff:       errcode=$?
      else
        start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE \
  +       --user $DAEMONUSER \
  +       --exec $DAEMON
  +     errcode=$?
  +   fi
  +   return $errcode
  +}
  +
  +run_server() {
  +  if [ -z "$DAEMONUSER" ] ; then
  +     killproc -p $PIDFILE $DAEMON -USR1
  +     errcode=$?
  +   else
  +     start-stop-daemon --stop --signal USR1 --quiet --pidfile $PIDFILE \
          --user $DAEMONUSER \
          --exec $DAEMON
        errcode=$?
  
positive.code: running() {
    [ ! -f "$PIDFILE" ] && return 1
    pid=`cat $PIDFILE`
    running_pid $pid $NAME || return 1
    return 0
  }
  
  
negative.code:   mkdir /var/run/chef
  fi
  
  DAEMON_OPTS="-d -P $PIDFILE -c $CONFIG -i $INTERVAL -s $SPLAY <%= node["chef_client"]["daemon_options"].join(' ') %>"
  
  if [ ! -z $LOGFILE ]; then
    DAEMON_OPTS="${DAEMON_OPTS} -L $LOGFILE"
  fi
  
  running_pid() {
    pid=$1
    name=$2
    [ -z "$pid" ] && return 1
    [ ! -d /proc/$pid ] &&  return 1
    cmd=`cat /proc/$pid/cmdline | tr '\000' '\n' | awk 'NR==2'`
    [ "$cmd" != "$name" ] &&  return 1
    return 0
  }
  