This article has been written for JBoss AS 5 and is now obsolete. Please check this tutorial to learn how to start/stop/restart WildFly or JBoss EAP: How to Start, Stop and Restart WildFly
One not well known option of the shutdown command is the -e option.
If you issue the shutdown with the -e option:
shutdown.sh -e 10
This will shutdown JBoss with the signal code of 10. When you issue this command the run script notice the “abnormal” exit code and restarts the app server.
This option is useful is you wrap your start/stop commands into scripts and you check the exit code in your script.