Register / Login
Win a copy of
The Way of the Web Tester: A Beginner's Guide to Automating Tests
this week in the
Does anyone have a script to restart JBoss running on Mac?
posted 4 years ago
4.2.3.GA on Mac 10.7.4. In short, I'm looking for a script that will cleanly restart JBoss. Below is what I'm trying, which isn't working.
I created this script at /System/Library/LaunchDaemons/jboss4.plist with owner/group = root/wheel and 644 permissions:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>jboss_server_4_2_3</string> <key>UserName</key> <string>davea</string> <key>GroupName</key> <string>staff</string> <key>ProgramArguments</key> <array> <string>/opt/jboss-4.2.3.GA/bin/run.sh</string> <string>-Djava.awt.headless=true</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist>
I load it up using
launchctl load /System/Library/LaunchDaemons/jboss4.plist
but this restart script isn't working, I think because the second command is getting run without waiting for the first one to stop. Does anyone have a script that will do this?
#!/bin/sh launchctl stop jboss_server_4_2_3 launchctl start jboss_server_4_2_3
Thanks, - Dave
Problem executing a command after startup(OSX 10.7)
How to get new file types recognized for drag&drop?
Trouble figuring out why Tomcat isn't launching on startup
Trouble launching Tomcat as daemon upon Mac startup