Sun GlassFish Enterprise Server v3 Administration Guide

ProcedureTo Restart Automatically on Linux

To set up automatic restart on Linux, you edit the /etc/inittab file. If you use /etc/rc.local, or your system’s equivalent, place a line in /etc/rc.local that calls the desired asadmin subcommand.

  1. Add a line of text to the /etc/inittab file.

    For example:

    das:3:respawn:/opt/SUNWappserver/bin/asadmin start-domain --user admin 
    --passwordfile /opt/SUNWappserver/password.txt domain1

    The text must be on a single line. The first three letters are a unique designator for the process and can be altered.