Weblogic Script to stop WebCenter environment

This script  stops WebCenter Services 

echo "############################"

echo "# All WebCenter Servers are STOPPING #"

echo "############################"

export FMW_HOME=/<path>/oracle/middleware/oracle_home

export DOMAIN_HOME=/<path>/domain_home/user_projects/domains/fmw_domain


. $FMW_HOME/wlserver/server/bin/setWLSEnv.sh

. $DOMAIN_HOME/bin/setDomainEnv.sh

. $DOMAIN_HOME/bin/setStartupEnv.sh


/<path>/jdk/bin/java weblogic.WLST /home/user/bin/stop.py


nohup $DOMAIN_HOME/bin/stopWebLogic.sh > $DOMAIN_HOME/servers/AdminServer/logs/AdminServer.out


$DOMAIN_HOME/bin/stopComponent.sh ohs1 > $DOMAIN_HOME/bin/ohs1.out

sleep 60


$DOMAIN_HOME/bin/stopComponent.sh ohs2 > $DOMAIN_HOME/bin/ohs1.out


nohup $DOMAIN_HOME/node1/stopNodeManager.sh > $DOMAIN_HOME/node1/logs/nodemanager.out

sleep 30


ssh -qt node2 "sh $HOME/bin/nmstop.sh"

sleep 30


ps -ef | grep weblogic|grep /<path> | awk '{print $2}' |xargs kill -9


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

cat /home/user/bin/stop.py

==============================


connect(  url='t3://**********.com:7001', adminServerName='AdminServer')


exitonerror=false


# Stop all managed Servers

shutdown('capture_server1', 'Server', force="true")

shutdown('capture_server2', 'Server', force="true")

shutdown('IPM_server1', 'Server', force="true")

shutdown('IPM_server2', 'Server', force="true")

shutdown('UCM_server1', 'Server', force="true")

shutdown('UCM_server2', 'Server', force="true")


exit()


No comments:

Post a Comment