2 # Starts the Apache-Tomcat web container with the Portal, EPSDK and DMaaP BC web apps.
3 # If arguments "-i ip.2.3.4" AND "-n name" are present, adds an entry to /etc/hosts;
4 # this was added as a workaround for missing DNS in the CSIT environment.
22 echo "$0: ignoring argument $key"
28 # Optionally add to /etc/hosts
29 if [ -z "${hostip}" -o -z "${hostname}" ]; then
30 echo "$0: Arguments for IP and name not found, continuing."
32 echo "$0: Using IP-name arguments $hostip $hostname"
33 grep $hostname /etc/hosts
35 if [ $ret_code != 0 ]; then
36 echo "$hostip $hostname" >> /etc/hosts
40 BASE=/opt/apache-tomcat-8.0.37
41 if [ ! -d $BASE ] ; then
42 echo "$0: $BASE not found or not a directory"
45 echo "$0: Starting server from $BASE"
46 LOGFILE=${BASE}/logs/catalina.out
47 echo "`date`:<-------------------- Starting -------------------->" >> $LOGFILE
48 exec ${BASE}/bin/catalina.sh run 2>&1 | tee -a $LOGFILE