Book Image

Wildfly Cookbook

Book Image

Wildfly Cookbook

Overview of this book

Table of Contents (23 chapters)
WildFly Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Invoking CLI commands declared in an external file


In this recipe, we will learn how to execute commands declared in a separate file, using the jboss-cli.sh script.

Getting ready

Remember I'm running WildFly remotely, bound to 192.168.59.103 as IP. WildFly is already up and running.

Create a file named wildfly-cookbook.cli, and insert the listing command ls into it. Place the file in your local $WILDFLY_HOME folder.

Now it's time to invoke our commands through the CLI!

How to do it…

Open a new terminal window and execute the following:

$ cd $WILDFLY_HOME
$ ./bin/jboss-cli.sh -c --controller=192.168.59.103:9990 --user=wildfly --password=cookbook.2015 --file=wildfly-cookbook.cli
core-service
deployment
deployment-overlay
extension
interface
path
socket-binding-group
subsystem
system-property
launch-type=STANDALONE
management-major-version=3
management-micro-version=0
management-minor-version=0
name=7536a491dba6
namespaces=[]
process-type=Server
product-name=WildFly Full
product-version=9.0.0.Beta2...