I'm not sure what you mean...you have to give it an argument, that's how the
script is written.  Either start or stop.

Actually, now that I look at the script, there's a some stuff missing if you
want to use it as a startup script in one of the rc.d directories.
Something like:

# source function library
. /etc/rc.d/init.d/functions

RETVAL=0
prog="tomcat"

JAVA_HOME=/some/path/to/jdk
CATALINA_HOME=/some/path/to/tomcat

You'd probably be better off just putting a couple lines into rc.local,
like:

/some/path/to/tomcat/script start

John


> -----Original Message-----
> From: Matt Raible [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 30, 2002 12:29 PM
> To: 'Tomcat Users List'
> Subject: RE: Start Apache/Jakarta-Tomcat as Non-root user
> 
> 
> I've noticed that if I run ./S40tomcat, I have to add "start" after it
> in order to get it to start from the command line.  Does the startup
> script add this automatically?
> 
> > -----Original Message-----
> > From: Matt Raible [mailto:[EMAIL PROTECTED]] 
> > Sent: Monday, September 30, 2002 8:12 AM
> > To: 'Tomcat Users List'
> > Subject: RE: Start Apache/Jakarta-Tomcat as Non-root user
> > 
> > 
> > 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
> > > ==================================
> > > 
> > > 
> > > 
> > > 
> > > 
> > > Lars Nielsen Lind <[EMAIL PROTECTED]>
> > > 09/28/2002 10:12 AM
> > > Please respond to "Tomcat Users List"
> > > 
> > >  
> > >         To:     [EMAIL PROTECTED]
> > >         cc: 
> > >         Subject:        Start Apache/Jakarta-Tomcat as 
> Non-root user
> > > 
> > > 
> > > Hi.
> > > 
> > > Are the some easy ways to start Apache / Jakarta-Tomcat as
> > > Non-root user 
> > > - for instance with a  user created for the purpose?
> > > 
> > > Are the any security risks (for instance access to root) to
> > > be aware of?
> > > 
> > > Best regards,
> > > 
> > > Lars Nielsen Lind
> > > 
> > > 
> > > --
> > > To unsubscribe, e-mail:   
> > > <mailto:tomcat-user-> [EMAIL PROTECTED]>
> > > For
> > > additional commands, 
> > > e-mail: <mailto:[EMAIL PROTECTED]>
> > > 
> > > 
> > > 
> > > 
> > 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

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

Reply via email to