| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #<%= @shell %>
- # *************************************************************************
- osWlHome=<%= @osWlHome %>
- osDomain=<%= @osDomain %>
- osDomainPath=<%= @osDomainPath %>
- nodeMgrPort=<%= @nodeMgrPort %>
- hostname=localhost
- user=<%= @wlsUser %>
- password=<%= @wlsPassword %>
- wlsAdminServer=<%= @wlsAdminServer %>
- echo "Stopping Weblogic ${wlsAdminServer} for domain ${osDomain}...."
- echo "Checking if Weblogic ${wlsAdminServer} for domain ${osDomain} is up...."
- unamestr=`uname`
- if [[ "$unamestr" == 'SunOS' ]]; then
- checkStmt='/usr/ucb/ps wwxa'
- else
- checkStmt='/bin/ps -eo pid,cmd'
- fi
- pid=`${checkStmt} | /bin/grep -i AdminServer | /bin/grep -v grep | awk '{print $1}'`
- nodePid=`${checkStmt} | /bin/grep -i nodemanager.javahome | /bin/grep -v grep | awk '{print $1}'`
- if [ ${pid} ]
- then
- if [ ${nodePid} ]
- then
- echo "The Weblogic ${wlsAdminServer} for domain ${osDomain} is running.. Stopping ${wlsAdminServer} NOW...."
- $osWlHome/common/bin/wlst.sh <<-EOF
- nmConnect('${user}','${password}','${hostname}','${nodeMgrPort}','${osDomain}','${osDomainPath}','ssl')
- nmKill('${wlsAdminServer}')
- nmDisconnect()
- EOF
- else
- echo "NodeManager is not running on this machine ${hostname}"
- echo "Start the NodeManager first"
- fi
- else
- echo "The Weblogic ${wlsAdminServer} for domain ${osDomain} is NOT running...."
- fi
- echo "Done...."
|