0

I have several bash scripts that log a user onto the Wildfly cli and then run some tasks.
For example:
read -p "Enter Admin Name :" USERNAME
read -s -p "Enter Admin Password :" SECRET
echo
/opt/wildfly/bin/jboss-cli.sh --connect controller=localhost:9990 --user=$USERNAME --password=$SECRET<<EOF
ls
deployment-info
exit
EOF

The login works and I can successfully run the tasks; but it keeps displaying the help options; cluttering up the screen. Is there a way to suppress this? When running the same commands directly on the cli not via script this does not happen. Did search online but no luck. RHEL7 Wildfly 21.0.2 (had same issue in Wildfly 18x).WildFly CLI

1 Answers1

0

After much more searching and coming up with better queries I found the answer; it's read the manual. Anyway I found that using the jboss-cli "--commands" switch solved my issue. So now my jboss snippet looks like

/opt/wildfly/bin/jboss-cli.sh --connect controller=localhost:9990 --user=$USERNAME --password=$SECRET --commands="ls,deployment-info,exit"