I'm using jboss-as-standalone.sh to manage JBoss EAP standalone as a service. I can start/stop the service with "service jboss-as-standalone.sh start/stop" while I'm on a terminal.
But I would like to start JBoss from outside the server via SSH using our Continuous Deployment Infrastructure. Therefore I'm issueing a command like this:
ssh root@myserver "service jboss-as-standalone.sh start"
The server starts up normally but SSH hangs. It seems it isn't able to close the connection because of the background job forked by this command in the script:
daemon --user $JBOSS_USER LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=$JBOSS_PIDFILE SERVER_HOME=$SERVER_HOME $JBOSS_SCRIPT -c $JBOSS_CONFIG 2>&1 > $JBOSS_CONSOLE_LOG &
Is there any other possibility to start JBoss as a service which works with notty SSH connections as well?