I would recommend starting and stopping using the init.d script provided with the jpackage.org packaging of jboss
JBossAS will log messages to stdout - look for the "Started in xxx seconds" message. Once you see that, initialization is complete, though, if there were errors, some things will not work.
The shutdown script also prints some text to stdout,
I suggest that you run the JBossAS scripts locally and observe the output. Then you can better decide how to code your script.
Thanks for the help guys.
I have observed the output. Now is there a way to verify the start/stop actually worked? IE checking running processing or something? The shutdown.sh script simply says that something was posted to the server and to check the logs. Logs could be in any location on different servers so i want to stay away from checking that.
For shutdown, the log that is referred to is the jboss_home/server/xxx/log/server.log file (where 'xxx' is the configuration name, typically 'default'). This log will contain the shutdown messages.
To check that startup was successful, a typical mechanism is to make an http request to port 8080 - if you get back a response it is (usually) running (actually, it just means the the http server is up). Another way would be to scan the console log for exceptions - if there are none then everything is OK.