BASH   86

runUpgrade

Guest on 18th July 2022 02:09:56 AM

  1. #! /bin/bash
  2. echo "excute..."
  3. . setenv
  4.  
  5. #JRE=/usr/bin/java
  6. JRE=`which java`
  7.  
  8. if [[ "$JRE" == "" ]] ; then
  9. echo "###########################################"
  10. echo JRE not existed!
  11. echo "###########################################"
  12. exit
  13. fi                    
  14.  
  15. # KEYSTORE=/GEINV/ca/cacerts
  16. # KEYSTORE=/etc/ssl/certs/java/cacerts
  17. # KEYSTORE=$AP/ca/tnkcacerts
  18. # tnkcacerts.ori
  19.  
  20. # TRUSSTORE=/GEINV/ca/tnkcacerts.ori
  21. # TRUSSTORE=/GEINV/ca/tnkcacerts.bak
  22. TRUSSTORE=$AP/ca/tnkcacerts
  23.  
  24. if [ ! -f $TRUSSTORE ] ; then
  25. echo "###########################################"
  26. echo keystore $TRUSSTORE not existed!
  27. echo "###########################################"
  28. exit
  29. fi                    
  30.  
  31. #if [ ! -f $KEYSTORE ] ; then
  32. #echo "###########################################"
  33. #echo keystore $KEYSTORE not existed!
  34. #exit
  35. #echo "###########################################"
  36. #fi
  37.  
  38. SSL_OPT=-Dsun.security.ssl.allowUnsafeRenegotiation=true
  39. SSL_TRUS="-Djavax.net.ssl.trustStore=$TRUSSTORE -Djavax.net.ssl.trustStorePassword=changeit"
  40.  
  41. # SSL_CERT="-Djavax.net.ssl.keyStore=$KEYSTORE -Djavax.net.ssl.keyStorePassword=changeit $SSL_OPT"
  42.  
  43. #TNK_REGION="-Dmode=local -Duser.language=zh -Duser.region=TW"
  44. MAIN_AP=com.tradevan.gateway.client.view.TurnkeyUpgradeDemon
  45. TNK_MODE=-Dmode=local
  46.  
  47.  
  48. # echo $CLASSPATH
  49. echo
  50.  
  51. cmd=".... $SSL_OPT $SSL_TRUS $SSL_CERT $TNK_MODE $TNK_REGION $MAIN_AP"
  52. echo $cmd;
  53.  
  54. cmd="$JRE -classpath $CLASSPATH $SSL_OPT $SSL_TRUS $SSL_CERT $TNK_MODE $TNK_REGION $MAIN_AP"
  55.  
  56.  
  57. # echo $cmd
  58. eval $cmd

Raw Paste


Login or Register to edit or fork this paste. It's free.