users@glassfish.java.net

Re: How to start glassfish automatically in Linux

From: Gabor Szokoli <szocske_at_gmail.com>
Date: Sat, 8 Mar 2008 08:03:15 +0100

On 3/8/08, glassfish_at_javadesktop.org <glassfish_at_javadesktop.org> wrote:
> How to start GlassFish automatically in Linux ?
> Anyone?

Here's a primitive way:

put these 2 lines in a file called /etc/init.d/glassfish :

#!/bin/bash
/opt/glassfish/bin/asadmin ${1}-domain

make it executable with this command:

chmod a+x /etc/init.d/glassfish

link it from the runleves you want it to run in, distro dependent, but
usually something like:

ln -s /etc/init.d/glassfish /etc/rc2.d/S99glassfish


Gabor Szokoli