Mac OS Xが起動したらJBossを同時に起動したい場合以下の設定をしておきます。
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