A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Spring in Action
this week in the
Does anyone have a script to restart JBoss running on Mac?
Joined: Jul 02, 2008
Sep 07, 2012 13:51:32
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
subject: Does anyone have a script to restart JBoss running on Mac?
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
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014