Tuesday, December 10, 2024

wlst script to restart weblogic managed server

stopserver1.py

import sys

connect('user','pw','t3://servername:7001')
domainRuntime()
shutdown('server1','Server','true',1000,'true');
shutdown('server2','Server','true',1000,'true');
exit()

stopserver1.sh

/****/oracle_common/common/bin/wlst.sh /*****/user_projects/domains/ap/restart/stopserver1.py $1 


startserver1.py

import sys

connect('user','pw','t3://servername:7001')
domainRuntime()
start('server1','Server','true',1000,'true');
start('server2','Server','true',1000,'true');
exit()

No comments: