1 Reply Latest reply on Feb 4, 2014 11:36 AM by redshift

    jboss-cli.sh and bash scripting

    redshift

      Hi everybody,

       

      I'm running two jboss 7.1.1 instances in domain mode with some servers belonging to different groups.

      I need to write a bash script to start and stop servers and I think that it should be possible trough the jboss-cli but up to now I was not able to write anything that worked.

      Any suggestions?

       

      Thank you very much.

        • 1. Re: jboss-cli.sh and bash scripting
          redshift

          For all those interested to this question the solution that I found was to use the jboss-cli.sh via batch mode:

           

          bin/jboss-cli.sh --file=test.cli

           

           

          $ cat ./test.cli

           

          connect node_address

           

          batch

           

          /host=node_name/server-config=server_name:stop

           

          run-batch

           

          Then I can call the jboss-cli.sh in a bash script to execute this commands.