Register / Login
This week's book giveaway is in the
We're giving away four copies of
Kotlin in Action
and have Dmitry Jemerov & Svetlana Isakova on-line!
Win a copy of
Kotlin in Action
this week in the
this forum made possible by our volunteer staff, including ...
Stephan van Hulst
Does anyone have a script to restart JBoss running on Mac?
posted 5 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
It is sorta covered in the
JavaRanch Style Guide
Boost this thread!
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