startNodeManager.sh.erb 1.2 KB

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