Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Starting NodeManager...
- NodeManager Started
- Elapsed time: 00:00:10
- Starting AdminServer...
- AdminServer Started
- Elapsed time: 00:01:10
- #!/bin/bash
- set -e
- clear
- TFILE=starting.log
- #--------------------------------------------------------------------------------
- Check_Status_NM ()
- {
- tail -F ${TFILE} | while read LOGLINE
- do
- if [[ "${LOGLINE}" == *"Secure socket listener started on port"* ]]
- then
- pkill -P $$ tail
- break
- elif [[ "${LOGLINE}" == *"Address already in use"* ]]; then
- pkill -P $$ tail
- echo -e "Cannot Start ServernSee starting.log for more info "
- exit 1
- fi
- done
- }
- #----------------------------------------------------------------
- Check_Status ()
- {
- tail -F ${TFILE} | while read LOGLINE
- do
- if [[ "${LOGLINE}" == *"The Network Adapter could not establish the connection"* ]] ; then
- echo -e "e[5me[93mWARNINGe[0m Could not establish the connectionne[91mCheck Connection to Databasee[0mn"
- elif [[ "${LOGLINE}" == *"<Server started in RUNNING mode>"* ]]
- then
- pkill -P $$ tail && cat /dev/null > ${TFILE}
- sleep 1
- break
- elif [[ "${LOGLINE}" == *"<Server state changed to FORCE_SHUTTING_DOWN>"* ]] || [[ "${LOGLINE}" == *"Address already in use"* ]]; then
- pkill -P $$ tail
- echo -e "e[91mCannot Start Servere[0mnSee starting.log for more info "
- exit 1
- fi
- done
- }
- export JAVA_OPTIONS="-Dweblogic.management.username=weblogic -Dweblogic.management.password=oracle11g"
- #-------Start NodeManager-------------------------------------------------------
- echo -e "Starting NodeManager..."
- nohup "$WLS_HOME"/server/bin/startNodeManager.sh > ${TFILE} 2>&1 &
- Check_Status_NM
- echo -e "NodeManager e[92mStartede[0mn"
- #--------------------------Start WebLogic Domain------------------------------------------------
- echo -e "Starting AdminServer..."
- nohup "$DOMAIN_HOME"/bin/setDomainEnv.sh > ${TFILE} 2>&1 &
- nohup "$DOMAIN_HOME"/bin/startWebLogic.sh > ${TFILE} 2>&1 &
- Check_Status
- echo -e "AdminServer e[92mStartede[0mn"
- #----------- Start FORMS------------------------------
- echo "Starting Forms Server..."
- nohup "$DOMAIN_HOME"/bin/startManagedWebLogic.sh WLS_FORMS t3://$(hostname):7001 > ${TFILE} 2>&1 &
- Check_Status
- echo "Forms Server e[92mStartede[0mn"
- #----------- Start Reports------------------------------
- echo -e "Starting Reports Server..."
- nohup "$DOMAIN_HOME"/bin/startManagedWebLogic.sh WLS_REPORTS t3://$(hostname):7001 > ${TFILE} 2>&1 &
- Check_Status
- echo -e "Reports Server e[92mStartede[0mn"
- #---------------------Start anything remaining using OPMN------------------------
- opmnctl startall ; opmnctl status ; emctl start agent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement