Hi All,
I have written a shell script to update my web application, i.e. executing the shell script automatically stops the
JBoss, replaces old ear file with new ear file and then start the JBoss.
I want the script to wait for the JBoss to stop and then start replacing the ear. I tried using wait $PID, extracting PID as:
PID=`ps -ef | grep 'jboss.sh' | tr -s " " | cut -d" " -f2`
PID=`echo $PID | cut -d" " -f1`
where jboss.sh is another script to stop the JBoss and then calling the wait as:
wait $PID
the issue with this is that it says:
test.sh: line 8: wait: pid 4215 is not a child of this shell.
Please help.
Thanks.