anchor.diff:          fi
       fi
       # fix permissions on the log and pid files
  -    export CATALINA_PID="/var/run/${NAME}.pid"
       touch $CATALINA_PID 2>&1 || RETVAL="4"
       if [ "$RETVAL" -eq "0" -a "$?" -eq "0" ]; then
         chown ${TOMCAT_USER}:${TOMCAT_USER} $CATALINA_PID
  
positive.code:     fi
      [ "$RETVAL" -eq "0" ] && $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start ${TOMCAT_LOG}" >> /var/log/${NAME}/initd.log 2>&1 || RETVAL="4"
      if [ "$RETVAL" -eq "0" ]; then
          log_success_msg
          touch ${LOCK_DIR}/${NAME}
      else
          log_failure_msg "Error code ${RETVAL}"
  
negative.code: 
  function checkpidfile()
  {
     if [ -f "${CATALINA_PID}" ]; then
        read kpid < ${CATALINA_PID}
        if [ ! -z ${kpid} ] && [ -d "/proc/${kpid}" ]; then
  # The pid file exists and the process is running
            RETVAL="0"
        else
  