Posted By

mindbts on 05/30/13


Tagged

JBoss as7


Versions (?)

cli-wrapper.sh


 / Published in: Bash
 

cli wrapper to do remote cli calls to JbossAS7

  1. #!/bin/bash
  2. #
  3. # A wrapper scripts for all cli scripts in this folder
  4. #
  5. # The following commands are supported:
  6. # executeOnAgent : execute a command on an agent
  7. #
  8.  
  9. # Figure out the cli scripts home
  10. WRAPPER_HOME=$(cd `dirname $0` && pwd)
  11. EAP_CLI_CLIENT_HOME=$WRAPPER_HOME/client
  12. SCRIPT_HOME=$WRAPPER_HOME/scripts
  13.  
  14. # TO-DO: Chage to jboss2 server IP
  15. EAP_SERVER=192.168.122.1
  16.  
  17.  
  18. echo "WRAPPER_HOME: $WRAPPER_HOME"
  19. echo "EAP_CLI_CLIENT_HOME=: $EAP_CLI_CLIENT_HOME"
  20. echo "EAP_SERVER= $EAP_SERVER"
  21. echo "SCRIPT_HOME: $SCRIPT_HOME"
  22.  
  23. # Check to see if we have a valid CLI home
  24. if [ ! -d ${EAP_CLI_CLIENT_HOME} ]; then
  25. echo "EAP_CLI_CLIENT_HOME is not correctly set. Please do so."
  26. exit 1
  27. fi
  28.  
  29. java -jar $EAP_CLI_CLIENT_HOME/jboss-cli-client.jar --file=$SCRIPT_HOME/deploy-my-app.cli --controller=$EAP_SERVER --connect --user=admin --password=admin

Report this snippet  

You need to login to post a comment.