Hi all,
I am not sure if this is the correct place for my question, but I couldn't find out anywhere so I try here. Maybe there is someone who can help.
I have a bash-script file used to start/stop the Jboss. I want to extend this script so that each time if one starts the Jboss it will check if a Jboss instance is already started. This will avoid double or multipul startup of Jboss.
I will use the folloing code to check the Jboss:
Code:
...
ps -ef | grep java | grep org.jboss.Main
...
If I got no hit, it means no Jboss is started. But how can I get the return string or return code?
Thomas