Skip to content

Start stop web application on jboss – twiddle script

August 25, 2010
tags: ,

To use
./ userName Password applicationName start
./ userName Password applicationName stop

You can also take in the parameter -h and -p host and port if machines are different.

#To start / stop a specific application in jboss
#set -x

if test $# -lt 4
      echo "Please enter the user,password,application war name and the start/stop op"
      app=$(./  -u $1 -p $2 query jboss.web.deployment:* | grep $3)

      app=`echo $app |  sed 's/r//g'`
      #app=`echo $app`

      doop=$(./ -u $1 -p $2 invoke $app $4)

      caps=`echo $4| tr '[:lower:]' '[:upper:]'`
      echo "** Application named : $3 , status now is: $caps"
      echo -e "n"
      if [ $4 == "start" ]
         status=$(./ -u $1 -p $2 get $app)
         echo $status

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: