-
1. Re: Scripting with SSH and jboss startup
peterj Feb 11, 2010 1:45 PM (in response to ed.larkin)1 of 1 people found this helpfulHave you tried using nohup to run both startup scripts. Example:
nohup /home/user/scripts/startservera.sh &
sleep 15
nohup /home/mdfuser/scripts/startserverb.sh &
I assume that you have run both the startup scripts manually without any issue.
Have you tried switching the order and seeing it the same problem occurs?
-
2. Re: Scripting with SSH and jboss startup
dmlloyd Feb 11, 2010 1:51 PM (in response to ed.larkin)Alternately you can try running via1 of 1 people found this helpfulsetsid(1)
if nohup doesn't work out. -
3. Re: Scripting with SSH and jboss startup
ed.larkin Feb 11, 2010 2:26 PM (in response to peterj)here is what i have tried since your post.
nohup /home/user/scripts/startservera.sh &
sleep 15
nohup /home/mdfuser/scripts/startserverb.sh &
still does not exit.
in the start script itself i used nohup and got the same results.
I tried to start one server
with ampersand
nohup /home/user/scripts/startservera.sh &
whithout
nohup /home/user/scripts/startservera.sh
-
4. Re: Scripting with SSH and jboss startup
ed.larkin Feb 11, 2010 2:34 PM (in response to dmlloyd)Tried setsid and get the same results....
[user@serverp scripts]$ ssh user@xxx.xxx.xxx.xxx 'setsid /home/user/scripts/build/startem.sh logout'
==================================================================
Server starting. See logs for more details
find logs at ~/logs/server.log
==================================================================
+ JAVA_HOME=/opt/jdk
+ export JAVA_HOME
+ JBOSS_HOME=/opt/jboss/
+ export JBOSS_HOME
+ /home/user/scripts/startserverb.sh
+ exit
If i shut down the server, i will finally get the exit from ssh.
-
5. Re: Scripting with SSH and jboss startup
ed.larkin Feb 11, 2010 5:03 PM (in response to ed.larkin)Fixed.
Removed the nohup, redirect, and ampersand from the startup script
Run ssh with this nohup /home/user/scripts/startservera.sh >> servera.out 2>&1 &
Thank you all for your suggestions.