If you launch apachectl restart, I guess it checks if there is a PID
file. If httpd finds PID, it kills current process and starts a new
apache process.

However, there is no "restart" option for Tomcat. So you have to call
shutdown and then startup.


-----Original Message-----
From: Jeremy Whitlock [mailto:[EMAIL PROTECTED] 
Sent: March 3, 2003 1:40 PM
To: 'Tomcat Users List'
Subject: RE: Tomcat as Linux Service

Yes.  Right now I use the earlier posted script to start/stop/reload
apache via "/sbin/service httpd start" and I'd like to do the same with
tomcat.  Here's how it would work:

Case 1) "Start" - It would check to see if Tomcat is already running.
If it's not running, start it.  If it's running already, echo a message.

Case2) "Stop" - It would check to see if Tomcat is running.  If it's
running, stop it.  If it's not, echo a message.

Case 3) "Restart/Reload" - It would check to see if Tomcat is running.
If it is, stop the service then start it.  If it's not running, echo a
message.

How can I do this?  I see items in the Apache start script that would do
this but I don't know what some of the others are.  Can someone help me
achieve this?  This file would be "/etc/init.d/tomcat" after it's
completed.  I would then chkconfig --add tomcat and boom, I have a
service.  Any help would be greatly appreciated.  Thanks, Jeremy


-----Original Message-----
From: p2 - apache [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 03, 2003 11:35 AM
To: 'Tomcat Users List'
Subject: RE: Tomcat as Linux Service

You mean create a service to start/shutdown a daemon?

-----Original Message-----
From: Jeremy Whitlock [mailto:[EMAIL PROTECTED] 
Sent: March 3, 2003 1:11 PM
To: Tomcat
Subject: Tomcat as Linux Service

Tomcat List,
                Does anyone know how to get Tomcat to be a service on a
Linux Box?  Thanks,
 
Jeremy Whitlock --- MCP/MCSA
IT Manager for Star Precision, Inc.
Phone:  (970) 535-4795
Metro:  (303) 926-0559
Fax:  (970) 535-0780
Metro Fax:  (303) 926-0559
http://www.starprecision.com 
 

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



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

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

Reply via email to