In this recipe, we will learn how to stop a WildFly instance via the CLI, or alternatively, restart it via the CLI.The restart option is in contrast to the
reload command of the previous recipe.
Start up your WildFly so that we can directly connect to it via the CLI, as follows:
$ cd ~/WFC/wildfly $ ./bin/standalone.sh
The command itself is pretty easy:
$ ./bin/jboss-cli.sh --connect [standalone@localhost:9990 /] shutdown [disconnected /]
The preceding command stops everything and drops you off from the CLI. Hence, in case you need to restart your WildFly instance, you need to execute the
standalone.sh script again, along with any parameter previously defined. ...