In the example below, Jim Coble also set CATALINA_HOME and JAVA_HOME in
his S40tomcat script.

On Mon, 2002-09-30 at 10:12, Matt Raible wrote:
> I've modified your script for RedHat Linux 7.3, but my tomcat instance
> still won't start on bootup.  I can execute ./S40tomcat, enter the
> tomcat user's password and everything works fine.  Any ideas or log
> files I can check?
> 
> #!/bin/bash
> #
> # Matt Raible 29 Sep 2002
> # For use on RedHat Linux - tested on v7.3
> 
> case "$1" in
> start)
>         su tomcat /usr/local/tomcat1/bin/startup.sh
>         sleep 5
>         ;;
> stop)
>         su tomcat /usr/local/tomcat1/bin/shutdown.sh
>         ;;
> *)
>         echo "Usage: $0 {start|stop}"
>         exit 1
>         ;;
> esac
> 
> exit 0
> 
> 
> > -----Original Message-----
> > From: Jim Coble [mailto:[EMAIL PROTECTED]] 
> > Sent: Saturday, September 28, 2002 8:11 AM
> > To: Tomcat Users List
> > Subject: Re: Start Apache/Jakarta-Tomcat as Non-root user
> > 
> > 
> > I accomplished this yesterday on Solaris 8 using the following script 
> > called at system startup (linked to S40tomcat in rc3.d)  ... Replace 
> > "tomcat" after the two su commands with the user you want 
> > Tomcat to run as 
> > and, of course, change the paths as appropriate for your 
> > system.  You'll 
> > also need to make sure your tomcat user has appropriate 
> > permissions on 
> > your tomcat directories.
> > --Jim
> > 
> > #!/sbin/sh
> > #
> > # Jim Coble 09 Jun 02
> > # Modified 27 Sep 02 to try to get to run as user tomcat
> >  
> > CATALINA_HOME=/usr/local/tomcat;export CATALINA_HOME 
> > JAVA_HOME=/usr/java;export JAVA_HOME
> >  
> > case "$1" in
> > start)
> >         su tomcat /usr/local/tomcat/bin/startup.sh
> >         sleep 5
> >         ;;
> > stop)
> >         su tomcat /usr/local/tomcat/bin/shutdown.sh
> >         ;;
> > *)
> >         echo "Usage: $0 {start|stop}"
> >         exit 1
> >         ;;
> > esac
> >  
> > exit 0
> > 
> > ==================================
> > Jim Coble
> > Senior Technology Specialist
> > Center for Instructional Technology
> > Email: [EMAIL PROTECTED]
> > Voice: 919-660-5974  Fax: 919-660-5923
> > Box 90198, Duke University
> > Durham, NC 27708-0198
> > ==================================
>...
-- 
------------------------------------------------------------------------
Thad Humphries              "...no religious test shall ever be required
Web Development Manager      as a qualification to any office or public
Phone: 540/675-3015, x225    trust under the United States." -Article VI


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to