This file is indexed.

/usr/share/checkbox/scripts/tomcat_test is in checkbox 0.13.7.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
#
#  Confirm Tomcat server is running and working properly
#  Requires: tomcat6
#

# Check tomcat is running
run1=`netstat -ltnp | grep '8080' | grep 'java'`
if [ -z "$run1" ]; then
  echo "FAIL: Tomcat is not running."
  exit 1 
fi

# Check if Tomcat is working; requires network connection so check it
check=`ping -c 2 www.ubuntu.com |grep "2 received"`
if [ -n "$check" ]; then
  work1=`w3m http://127.0.0.1:8080 | grep "works"`
  if [ -z "$work1" ]; then
    echo "FAIL: Tomcat is not working properly."
    exit 1
  fi
fi

exit 0