我正在使用Mac OS X Lion并且刚刚安装了JBoss 7.1.0.AS.我无法让JBoss服务器在系统启动时运行。我创建了以下文件(/System/Library/LaunchDaemons/jboss.plist)......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple$
<plist version="1.0">
<dict>
<key>Label</key>
<string>jboss</string>
<key>Disabled</key>
<false/>
<key>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
</dict>
<key>ProgramArguments</key>
<array>
<string>sh /opt/jboss-as-7.1.0.Final/bin/standalone.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>UserName</key>
<string>davea</string>
</dict>
</plist>
但是,当我重新启动计算机时,服务器未运行。有没有人在Mac OS X Lion上有JBoss的工作启动脚本,或者你能看出上面有什么问题吗?
谢谢,
答案 0 :(得分:1)
愿所有后代都能从我即将抛弃的神圣知识中受益(感谢Barry Margolis)。脚本是
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple$
<plist version="1.0">
<dict>
<key>Label</key>
<string>jboss</string>
<key>Disabled</key>
<false/>
<key>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
</dict>
<key>Program</key>
<string>/opt/jboss-as-7.1.0.Final/bin/standalone.sh</string>
<key>StandardOutPath</key>
<string>/Users/davea/out.log</string>
<key>RunAtLoad</key>
<true/>
<key>UserName</key>
<string>davea</string>
</dict>
</plist>
使用root:wheel owner和group确保脚本已注册644 perms。摇滚, - 戴夫