#
# PROPRIETARY/CONFIDENTIAL. Use of this product is subject to
# license terms. Copyright C 2001-2003 Sun Microsystems, Inc.
# All rights reserved.
#

if ${DPS_TEST} -f "${PID_FILE}" ; then
    pid=`${DPS_CAT} "${PID_FILE}"`
    rpid=`${DPS_PS} -p $pid | ${DPS_GREP} ldapfwd | ${DPS_SED} -e 's/^  *//' -e 's/ .*//'`
    if ${DPS_TEST} "$rpid" = "$pid" ; then
       ${DPS_ECHO} "The DPS process for ${INSTANCE} is running ($pid)."
       exit 0
    fi
    ${DPS_RM} "${PID_FILE}"
fi

${DPS_ECHO} "Since the DPS.pid file was not found, DPS for ${INSTANCE} is assumed down."

exit 1
