0 Replies Latest reply: Jul 7, 2011 1:00 AM by godSpeed RSS

    how to start glassfish domain in any shell other than ksh.

    godSpeed
      Hi,
      Glassfish domain has to be started in kourne shell.
      In Bourne shell, all DAS, node agent, and instance processes exit when console window is closed.

      I am developing a script to start-stop domains automatically but i need to include kourne shell in the script, if i run the script in kourne shell, it doesn't run.
      Please help me, i have tried exec /bin/ksh, #!/bin/ksh , #!/usr/bin/ksh

      The script is as follows

      exec /bin/ksh


      GLASSFISH_HOME=/opt/SUNWappserver/bin;
      GLASSFISH_ADMIN=admin;
      GLASSFISH_DOMAIN=AxisITS;
      GLASSFISH_PASSWORD=/opt/SUNWappserver/bin/password_AxisITS.txt;
      export GLASSFISH_HOME GLASSFISH_PASSWORD GLASSFISH_ADMIN GLASSFISH_DOMAIN

      start() {
      echo -n "Starting Glassfish: "
      $GLASSFISH_HOME/asadmin start-domain user $GLASSFISH_ADMIN passwordfile $GLASSFISH_PASSWORD $GLASSFISH_DOMAIN
      echo "done"
      }

      stop() {
      echo -n "Stopping Glassfish: "
      $GLASSFISH_HOME/asadmin stop-domain $GLASSFISH_DOMAIN
      echo "done"
      }

      case "$1" in
      start)
      start
      ;;
      stop)
      stop
      ;;
      restart)
      stop
      start
      ;;
      *)
      echo $"Usage: Glassfish {start|stop|restart}"
      exit
      esac

      Krunal shimpi