stopNodeManager.sh.erb 559 B

1234567891011121314151617181920212223
  1. #<%= @shell %>
  2. # *************************************************************************
  3. # This script can be used to stop the WebLogic NodeManager
  4. #
  5. echo "Stopping Nodemanager..."
  6. unamestr=`uname`
  7. if [[ "$unamestr" == 'SunOS' ]]; then
  8. checkStmt='/usr/ucb/ps wwxa'
  9. else
  10. checkStmt='/bin/ps -eo pid,cmd'
  11. fi
  12. PID=`${checkStmt} | /bin/grep -i nodemanager.javahome | /bin/grep -v grep | awk '{print $1}'`
  13. if [ ${PID} ]
  14. then
  15. kill ${PID}
  16. echo "NodeManager with process ID ${PID} will be shutdown..."
  17. else
  18. echo "No NodeManager process found!"
  19. fi