There is one difficulty with console return after calling startWebLogic.sh and startManagedWebLogic.sh. Regarding to it I had to run it in background. If startup script runs in background it returns code which means successful completion of "&" operation. If you need to make sure services started correctly code you have two ways:
- do it in WLST
- try to catch "<Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
This script installed at development server. As it is not a production variant and have limited number of domains I do not have to spend much time WLST script coding (which is actually python). Lately if it would be necessary I will certainly do advanced script to automatically start/stop WLS domains. There are some simple samples.
#!/bin/sh
# using of LOOPs is regarded to future improovements. May well you will
# have several Admin servers and Several Managed Servers. Just change
# the code to work with arrays.
# The only problem is to check successfull start of Java instances which is in background.
LOG_ADM="/tmp/ora_wls-admin"
LOG_MNGR="/tmp/ora_wls-nmgr"
MW_HOME="/u01/oracle/mw"
WLS_DOMAINS_ADM="base_domain"
WLS_DOMAINS_MNGD="osb_server1 Server-0"
#for compatibility with sh
ADNAME="basedomain"
MDNAME="osbserver1"
# write svn information to a header
version() {
Log " category System scripts"
Log " author V.Bychkov"
Log " changedby $Author: bes $"
Log " version SVN: $Id: oracle.wls-middleware 1002 2011-07-04 04:26:20Z bes $"
Log " revision SVN: $Revision: 1002 $"
#!/bin/sh
# using of LOOPs is regarded to future improovements. May well you will
# have several Admin servers and Several Managed Servers. Just change
# the code to work with arrays.
# The only problem is to check successfull start of Java instances which is in background.
LOG_ADM="/tmp/ora_wls-admin"
LOG_MNGR="/tmp/ora_wls-nmgr"
MW_HOME="/u01/oracle/mw"
WLS_DOMAINS_ADM="base_domain"
WLS_DOMAINS_MNGD="osb_server1 Server-0"
#for compatibility with sh
ADNAME="basedomain"
MDNAME="osbserver1"
# write svn information to a header
version() {
Log " category System scripts"
Log " author V.Bychkov"
Log " changedby $Author: bes $"
Log " version SVN: $Id: oracle.wls-middleware 1002 2011-07-04 04:26:20Z bes $"
Log " revision SVN: $Revision: 1002 $"
Log " link $HeadURL: file:///opt/svn/projects/scripts/oracle/init.d/oracle.wls-middleware $" Log "# date $Date: 2011-07-04 14:26:20 +1000 (Mon, 04 Jul 2011) $"}