tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik - Dev Lists <devli...@hanik.com>
Subject Re: Simple Tomcat 6, servlet tutorial. First draft for comment
Date Wed, 11 Feb 2009 12:50:02 GMT
you'd write it yourself

for example, configure CATALINA_HOME, CATALINA_BASE, TOMCAT_USER and 
CATALINA_PID and to start you would do


start() {
    isrunning
    if [ $? -eq 0 ];
    then
        echo "Tomcat is already running: PID=$PID"
        return 1
    fi
           
    if [ -f $CATALINA_BASE/bin/startup.sh ];
    then
        echo "Starting Tomcat"
        /bin/su $TOMCAT_USER $CATALINA_HOME/bin/startup.sh
        PID=`cat $CATALINA_PID`
        echo "Tomcat started: PID=$PID"
    fi
}


the is running function would check to see if the PID exists
the stop function would issue a kill, then sleep X seconds and then 
issue a kill -9 if the process is still running

Filip

Dave Pawson wrote:
> 2009/2/10 Filip Hanik - Dev Lists <devlists@hanik.com>:
>   
>> What benefit do you get from running it with JSVC, vs just writing a simple
>> script into /etc/init.d/ to manage it yourself?
>>     
>
> It was offered. I went to the trouble of amending it to make it work.
> I do manage it myself? How would another script in init.d help?
>
> regards
>
>
>   
>> Filip
>>
>> Dave Pawson wrote:
>>     
>>> http://www.dpawson.co.uk/tomcat
>>>
>>> Any feedback/improvements appreciated. Particularly any errors.
>>>
>>> Meant as a simple example of getting a first servlet working, based on
>>> help I received from this list.
>>>
>>>
>>> regards
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>     
>
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message