Skip to content

Start stop web application on jboss – twiddle script

August 25, 2010
tags: ,

To use
./jbossApp.sh userName Password applicationName start
./jbossApp.sh 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
then
      echo "Please enter the user,password,application war name and the start/stop op"
else
      app=$(./twiddle.sh  -u $1 -p $2 query jboss.web.deployment:* | grep $3)

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

      doop=$(./twiddle.sh -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" ]
        then
         status=$(./twiddle.sh -u $1 -p $2 get $app)
         echo $status
      fi
fi

Advertisements
No comments yet

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: