summary of automatic starting of tomcat

From: Ramaswamy, Satish <Satish.Ramaswamy_at_uscellular.com>
Date: Tue Dec 03 2002 - 15:18:24 EST
a correction the syntax of the link command should be ln -s
/etc/init.d/tomcat S<number>tomcat ...

sorry. i always get confused  and hence  check my unix in a nutshell.

s


-----Original Message-----
From: Ramaswamy, Satish
Sent: Tuesday, December 03, 2002 2:10 PM
To: 'sunmanagers@sunmanagers.org'
Subject: summary of automatic starting of tomcat


all: thanks  for your input. i was given a script  which i'm enclosing after
i've made changes to it according to my environment. this  was provided by
david foster. i'll implement and test  it later on tonight.

so hopefully, the scottish  chap  who also has tomcat installed can use this
instead of manually starting it up.

i've placed it in /etc/init.d/tomcat and made it executable. i'll create a
symbolic link in the /etc/rc3.d/ dir

cd /etc/rc3.d
ln -s S98autotomcat /etc/init.d/tomcat though  david instructed me to do this
i the /etc/rc2.d  dir but i think it shouldn't make a difference.

i'm also sending it as a text attachement david's  orginal script.

satish

#!/bin/sh
# Make sure that /export/home/webmstr/ is mounted
[ ! -d /export/home/webmstr/jakarta-tomcat-3.3 ] && exit 1

case "$1" in
'start')
        if [ -x /export/home/webmstr/jakarta-tomcat-3.3/bin/startup.sh ];
then
                echo "Starting tomcat server ..."
                JAVA_HOME=/usr/j2se; export JAVA_HOME
                TOMCAT_HOME=/export/home/webmstr/jakarta-tomcat-3.3
                export TOMCAT_HOME
                /export/home/webmstr/jakarta-tomcat-3.3/bin/startup.sh
        fi
        ;;

'stop')
        if [ -x /export/home/webmstr/jakarta-tomcat-3.3/bin/shutdown.sh ];
then
                echo "Stopping tomcat server ..."
                JAVA_HOME=/usr/j2se; export JAVA_HOME
                TOMCAT_HOME=/export/home/webmstr/jakarta-tomcat-3.3
                export TOMCAT_HOME
                /export/home/webmstr/jakarta-tomcat-3.3/bin/shutdown.sh
        fi

        ;;

*)
        echo "Usage: $0 { start | stop }"
        exit 1
        ;;
esac
exit 0
#!/sbin/sh
# Make sure that /usr/local/ is mounted
[ ! -d /usr/local/jakarta-tomcat-4.0.5 ] && exit 1

case "$1" in
'start')
	if [ -x /usr/local/jakarta-tomcat-4.0.5/bin/startup.sh ]; then
		echo "Starting tomcat server ..."
		JAVA_HOME=/usr/j2se; export JAVA_HOME
		CATALINA_HOME=/usr/local/jakarta-tomcat-4.0.5
		export CATALINA_HOME
		/usr/local/jakarta-tomcat-4.0.5/bin/startup.sh
	fi
	;;

'stop')
	if [ -x /usr/local/jakarta-tomcat-4.0.5/bin/shutdown.sh ]; then
		echo "Stopping tomcat server ..."
		JAVA_HOME=/usr/j2se; export JAVA_HOME
		CATALINA_HOME=/usr/local/jakarta-tomcat-4.0.5
		export CATALINA_HOME
		/usr/local/jakarta-tomcat-4.0.5/bin/shutdown.sh
	fi
	;;

*)
	echo "Usage: $0 { start | stop }"
	exit 1
	;;
esac
exit 0
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Tue Dec 3 15:20:54 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:59 EST