You can probably use list-components command in your script to get all the applications (which is just one in your case), and parse the output to get the name and use undeploy command on it.
[Message sent by forum member 'hzhang_jn']
http://forums.java.net/jive/thread.jspa?messageID=476540