function detect_tomcat() {

yaimlog INFO "Detecting TOMCAT"

for i in /etc/tomcat*; do
  if [ -d "$i" ]; then
     export TOMCAT_VERSION=`echo $i | sed -e 's/\/etc\///'`
     yaimlog DEBUG "Tomcat version is ${TOMCAT_VERSION}"
     break
  fi
done

}
