0 Replies Latest reply on Jul 31, 2002 5:20 PM by essington

    Starting JBoss at system startup on OS X

    essington

      I have a shiny new xserve that I am trying to get JBoss to start up on when the system boots. I have created my startup script, but am wondering if anyone with more OS X - Server experience than myself would tell me if I am doing anything drastically wrong in my script.

      note, this iteration does work (at least the server starts up as user jboss and every thing seems to work)

      /Library/StartupItems/Jboss/JBoss

      #!/bin/sh

      . /etc/rc.common

      StartService()
      {
      ConsoleMessage "Starting JBoss application server"

      sudo -u jboss /Library/jboss/bin/run.sh > /dev/null &
      }

      StopService()
      {
      ConsoleMessage "Stopping JBoss application server"

      sudo -u jboss /Library/jboss/bin/shutdown.sh -S > /dev/null
      }

      RestartService()
      {
      StopService
      StartService
      }

      RunService "$1"

      --eof--

      and my StartupParameters.plist file is prety much a direct copy of others found in other startup scripts

      /Library/StartupItems/JBoss/StartupParameters.plist

      {
      Description = "JBoss application server";
      Provides = ("JBoss");
      Requires = ("PostgreSQL");
      Preference = "Late";
      Messages =
      {
      start = "Starting JBoss";
      stop = "Stopping JBoss";
      };
      }
      --eof--

      I forced the dependency on PostgreSQL since I use a PostgreSQL data source in my application.

      So does anyone with MacOS X Server experience see anything that should be changed?

      any feedback would be appreciated

      -jason
      aka new Xserve admin :-)