posted 19 years ago
I am trying to automate the process of recylcing my Weblogic Production server. So instead of starting the Weblogic admin server and then the managed servers separately, I wish to put the entire sequence in a shell script.
eg.my script would be restartProd.sh which calls stopServices.sh and startServices.sh
In the case of the stopServices script, which is the best and safest way to identify that the admin and managed server processes have stopped.
Now in startServices.sh, I use
tail -1 nohup.wladmin | grep -ic "Production Mode"
where nohup.wladmin is the file which is created when i run the script by putting >> in the original command.
If this returns true, admin server has started. So, I issue commands to start webdriver and txn server in the script. Since webdriver starts soon, I just put a sleep 60 after the command. But the problem is txn server takes time and thats not exactly predictable. How do I deal with this. Any idea ?