You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by exabrial <ex...@gmail.com> on 2012/08/09 17:11:30 UTC

Info: Startup Script

This should probably go on the wiki... but I don't know where. Anyway, Ubuntu
includes a 'better' way of starting services at boot. It's called upstart,
and the scripts are far more human readable. This same script can also be
used to run vanilla Tomcat.

/etc/init/tomee.conf


description "Apache TomEE Server"

# Make sure the file system and network devices have started before
# we begin the daemon
start on (filesystem and net-device-up IFACE!=lo)

# Stop the event daemon on system shutdown
stop on shutdown

# Respawn the process on unexpected termination
respawn

env HOME=/home/tomee

# The meat and potatoes
exec sudo -u tomee /home/tomee/apache-tomee-webprofile-1.0.0/bin/catalina.sh
run 



This script is loosely based on a lot of internet searches, so credit goes
to the internet.
The script assumes the server will run as the user tomee and that the server
is installed to /home/tomee
To actually start/stop the server, simply type *sudo service tomee
[start|stop|restart]*




--
View this message in context: http://openejb.979440.n4.nabble.com/Info-Startup-Script-tp4656753.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Info: Startup Script

Posted by Romain Manni-Bucau <rm...@gmail.com>.
it doesn't block ;)

it was why i was using it.

but well your point is enough to convince me

- Romain


2012/8/9 exabrial <ex...@gmail.com>

> startup.sh terminates
> catalina.sh blocks
>
> We couldn't use the respawn after a crash if we use startup.sh
>
> Is there a particular advantage to using startup.sh that I'm not aware of?
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Info-Startup-Script-tp4656753p4656759.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: Info: Startup Script

Posted by exabrial <ex...@gmail.com>.
startup.sh terminates
catalina.sh blocks

We couldn't use the respawn after a crash if we use startup.sh

Is there a particular advantage to using startup.sh that I'm not aware of?



--
View this message in context: http://openejb.979440.n4.nabble.com/Info-Startup-Script-tp4656753p4656759.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Info: Startup Script

Posted by Romain Manni-Bucau <rm...@gmail.com>.
hmm,

why catalina.sh run? why not start? and why not using catalina.sh stop for
shutdown?

- Romain


2012/8/9 exabrial <ex...@gmail.com>

> This should probably go on the wiki... but I don't know where. Anyway,
> Ubuntu
> includes a 'better' way of starting services at boot. It's called upstart,
> and the scripts are far more human readable. This same script can also be
> used to run vanilla Tomcat.
>
> /etc/init/tomee.conf
>
>
> description "Apache TomEE Server"
>
> # Make sure the file system and network devices have started before
> # we begin the daemon
> start on (filesystem and net-device-up IFACE!=lo)
>
> # Stop the event daemon on system shutdown
> stop on shutdown
>
> # Respawn the process on unexpected termination
> respawn
>
> env HOME=/home/tomee
>
> # The meat and potatoes
> exec sudo -u tomee
> /home/tomee/apache-tomee-webprofile-1.0.0/bin/catalina.sh
> run
>
>
>
> This script is loosely based on a lot of internet searches, so credit goes
> to the internet.
> The script assumes the server will run as the user tomee and that the
> server
> is installed to /home/tomee
> To actually start/stop the server, simply type *sudo service tomee
> [start|stop|restart]*
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Info-Startup-Script-tp4656753.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.