[HOME]: [Mac OS X]: [MacPython]: [Emacs]: [生存報告記]: [MacEmacs JP Project]: [NTEmacs JP Project]:

Mac OS Xが起動したらJBossを同時に起動したい場合以下の設定をしておきます。

SystemStarter

mkdir /Library/StartupItems/JBoss
touch /Library/StartupItems/JBoss/JBoss
chmod o+x /Library/StartupItems/JBoss/JBoss
touch /Library/StartupItems/JBoss/StartupParameters.plist

/Library/StartupItems/JBoss/StartupParameters.plistの内容

{
  Description   = "JBoss";
  Provides      = ("JBoss");
  Requires      = ("Resolver");
  Preference    = "Late";
  Messages =
  {
    start = "Starting JBoss";
    stop  = "Stopping JBoss";
  };
}

/Library/StartupItems/JBoss/JBossの内容

#!/bin/sh
. /etc/rc.common

startJBoss()
{

if [ "${JBOSS:=-YES-}" = "-YES-" ]; then
    ConsoleMessage "Starting JBoss server"
    /usr/local/jboss/jboss-3.0.3/bin/run.sh &
fi
}
                                                   
stopJBoss()
{
  ConsoleMessage "Stopping JBoss services"
  /usr/local/jboss/jboss-3.0.3/bin/shutdown.sh
}

if /bin/test "$1" = "start"
then
   startJBoss
elif /bin/test "$1" = "stop"
then
   stopJBoss
fi


JBoss CategoryPrograming CategoryJava CategoryMac

紹介マニアMoinMoin: JBoss/Systerm Starterの設定 (last edited 2002-11-03 15:00:00 by )