automatic starting of tomcat

From: Ramaswamy, Satish (Satish.Ramaswamy@uscellular.com)
Date: Tue Dec 03 2002 - 13:43:03 EST


i'm sending this again as i got a weird response that the header was
suspicious.

-----Original Message-----
From: Ramaswamy, Satish
Sent: Tuesday, December 03, 2002 12:33 PM
To: 'sunmanagers@sunmanagers.org'
Subject: RE: automatic starting of tomcat
Importance: High

yes. the script is executable and there are no errors in the cron log file
/var/cron/olog file.

randy, i know grep something always returns something.
but if you use
grep "[1st letter in the grep expression] rest of pattern", you don't have to
use grep -v grep. you can test it out. i use it all the time.

darren, my other scripts in the crontab work. i understand *not working* is
a generic term but there are no errors in the cron log file. that's what is
bothering me. and i feel surely someone out there is running tomcat in a sun
server and i've tried echo "started" /tmp/autotomcat and the file does get
created.

also i tried, JAVA_HOME=/usr/bin/java (i did type java to find out where
java is located)
                export JAVA_HOME

but i get java exceptions. and i my tomcat startup script is named
startup.sh.

-----Original Message-----
From: Bablak, Steve [mailto:Steve.Bablak@Marconi.com]
Sent: Tuesday, December 03, 2002 12:15 PM
To: Ramaswamy, Satish
Subject: RE: automatic starting of tomcat

is the script executable? i.e.) permissions 7xx

-----Original Message-----
From: Ramaswamy, Satish [mailto:Satish.Ramaswamy@uscellular.com]
Sent: Tuesday, December 03, 2002 12:52 PM
To: sunmanagers@sunmanagers.org
Subject: automatic starting of tomcat

hi, i have a solaris e-450 server and each time i'd like to find out how to
start tomcat automatically when the server reboots.

i've written a wrapper script called autotomcat as follows

#!/bin/sh
#written by satish ramaswamy
TOMCAT_HOME=/export/home/webmstr/jakarta-tomcat-3.3
export TOMCAT_HOME
PATH=/usr/bin:/usr/sbin:/usr/dt/bin:/usr/openwin/bin:/usr/ucb:$TOMCAT_HOME/b
i
n:.
export PATH #chang made 12/03/02
cd $TOMCAT_HOME/bin
pscount=`ps -ef |grep "[j]ava"| wc -l`
#echo $pscount
if [ $pscount -eq 0 ]; then
    cd $TOMCAT_HOME/bin
    #echo "inside if"
    tomcat.sh start
fi

i've tried couple of things.
1) renamed this script S98autotomcat and placed it in /etc/rc3.d/
directory
but this doesn't seem to work when the server reboots.
2) in cron 10,20,30,40,50 * * * * /scripts/autotomcat > /dev/null have the
script called every 10 minutes. the reason i do this is because i have a
backup script and don't know how long the backup takes and at the end i
reboot the server.

but this didn't work either. however, i changed my autotomcat script and
am
now exporting the PATH but i don't see why i should since i'm not using
the variables in the script outside the script.

thanks in advance.

satish
ph:630-875-8263
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:25:24 EDT