JBoss Community

Re: Find JBoss installation

created by Tomasz Cendrowski in Beginner's Corner - View the full discussion

Thanks for answers. I made it this way:

 

JBOSS_HOME=$(ps efax | grep "JBOSS_HOME" | grep java | sed "2,1000d" | sed 's/.*JBOSS_HOME=//' | sed 's/services\/jboss .*/services\/jboss/')

 

In my working environment JBOSS_HOME always ends with '/services/jboss' so I am cutting everything after that and everything from beggining of listing to 'JBOSS_HOME=' text. Those things are made by sed. sed "2,1000d" takes only first listing if more than one were found.

 

Greets.

Reply to this message by going to Community

Start a new discussion in Beginner's Corner at Community