anchor.diff:  CMD="$JAVA_HOME/bin/java -cp $CP -Dcom.webtrends.log.dir=<%=@log_dir%> $JMX_OPTS"
   
   # Find current PID if any.
  -FOUND_PID=`ps -ef |grep $MAIN |grep -v grep |awk {print $2}'`
  +FOUND_PID=`ps -ef |grep $MAIN |grep -v grep |awk '{print $2}'`
   
   # Check what the caller wants.
   case "$1" in
  
positive.code:         echo "usage: daemon {start|stop|status}" >&2
          exit 1
          ;;
  esac
negative.code:         ;;
      stop)
          if [ "" = "$FOUND_PID" ]; then
              echo "Service not running, nothing to stop."
              exit 1
          else
              kill $FOUND_PID
              sleep 4
              # Find PID again to see if we need to use kill -9 termination.
              FOUND_PID=`ps -ef |grep $MAIN |grep -v grep |awk '{print $2}'`
              if [ "" != "$FOUND_PID" ]; then
                  echo "Using kill did not work, sending kill -9 to process."
                  kill -9 $FOUND_PID
              fi
              exit 0
          fi 
          ;;
      status)
  