startNodeManager.sh.erb 912 B

12345678910111213141516171819202122232425262728293031
  1. #<%= @shell %>
  2. # *************************************************************************
  3. echo "Starting the Weblogic NodeManager...."
  4. echo "Checking if the Weblogic NodeManager is already started...."
  5. unamestr=`uname`
  6. if [[ "$unamestr" == 'SunOS' ]]; then
  7. checkStmt='/usr/ucb/ps wwxa'
  8. else
  9. checkStmt='/bin/ps -eo pid,cmd'
  10. fi
  11. pid=`${checkStmt} | /bin/grep -i nodemanager.javahome | /bin/grep -v grep | awk '{print $1}'`
  12. if [ ${pid} ]
  13. then
  14. echo "The NodeManager is already running.. NodeManager NOT started again...."
  15. else
  16. echo "The NodeManager is not running yet.. Starting NodeManager now...."
  17. sleep 3
  18. <%= @nodeMgrPath %>/startNodeManager.sh &
  19. sleep 5
  20. pid=`${checkStmt} | /bin/grep -i nodemanager.javahome | /bin/grep -v grep | awk '{print $1}'`
  21. if [ ${pid} ]
  22. then
  23. echo "NodeManager is started with pid : $pid...."
  24. else
  25. echo "Error while starting NodeManager...."
  26. fi
  27. fi