I have an improved RedHat style init script along with a jboss sysconfig file (for configurable options, like the user to run jboss as, port to bind the http service to, location of the JDK, etc. After trying to get the jboss_init_redhat.sh script working like I wanted it to, I gave up and practically rewote the whole thing. There is now a dependency that you have sudo installed on the system, so that it can correctly run the process as another user. If you've got it configured to bind to port 1024 or below (esp port 80, for those of you running this as if it were a web server as well), an if the script can find the iptables executable, it will insert a redirect firewall rule redirecting the specified port (1024 or below) to port 8080. It will also clean up this rule when you shut the server down using this script. If you place the jboss_init_redhat.sh script into /etc/init.d/jboss and the jboss_sysconfig_redhat file into /etc/sysconfig/jboss, then run chkconfig --add jboss, this will set you up. You'll then be able to run the following command to start / stop jboss (as root, of course):
service jboss <start / stop / status> [server configuration]
the server configuration option is only used during the start command, and specifies which server directory to use (all, default, minimal, etc., with default being the default)
This script should work for most versions of jboss, but I've only tried with the 3.0.X and 3.2.X builds.
Any comments, or suggestions for improvement, please send me an email to email@example.com.
please send to the sourceforge patch tracker, attachments on the forums survive poorly.