The /etc/rc.d/init.d scripts look complex, but there's really one very
simple line to them:
# chkconfig: 345 85 15
its the comment at the top of them all. to get tomcat to start
automatically, try something like (note I haven't done this myself, so its
not guarenteed to work - but do ask):
1. copy tomcat.sh to /etc/rc.d/init.d/tomcat
2. edit the new tomcat script so that tomcat runs under the appropriate
user (as the /etc/rc.d scripts are called by root (su <user> -c "cmd")
3. at the top of the file add a comment like the one above. the syntax of
the comment is:
# chkconfig: <runlevels> <startorder> <stoporder>
you'll need it to start before apache, and start after... try
# chkconfig: 345 84 16
4. run the command "chkconfig --add tomcat"
5. run the command "chkconfig --level 345 tomcat on"
that should have tomcat start automatically in runlevels 3 4 and 5.
hth,
cheesr
dim
On Thu, 16 Aug 2001, Alejandro Arredondo wrote:
> How can I add tomcat to run as a service under Linux and to work with apache?. I saw
>the script that starts apache at boot time and looks pretty confusing. Is there any
>way to add tomcat to that script to start before apache?
> Thanks in advance
>
> _____________________________________________________________
> Free E-mail --->
> http://letodesigns.mail.everyone.net
> Letodesigns & Programming Free e-mail
> 6MB limit
> http://letodesigns.8k.com
>