start_linux_min.sh 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/bin/bash
  2. # Copyright (c) http://www.o2oa.net/
  3. current_dir="$(cd "$(dirname "$0")"; pwd)"
  4. cd ${current_dir}
  5. if [ -d ${current_dir}/local/update ]
  6. then
  7. for D in commons configSample localSample jvm servers store config local
  8. do
  9. if [ ! -d ${current_dir}/$D ]
  10. then
  11. mkdir ${current_dir}/commons
  12. fi
  13. done
  14. if [ -f ${current_dir}/local/update/o2server/version.o2 ]
  15. then
  16. echo 'update o2server.'
  17. for D in commons configSample localSample jvm servers store
  18. do
  19. if [ -d ${current_dir}/local/update/o2server/$D ]
  20. then
  21. echo "update ${current_dir}/$D."
  22. cp -Rf -p ${current_dir}/local/update/o2server/$D ${current_dir}/
  23. fi
  24. done
  25. for F in console.jar index.html src.zip
  26. do
  27. if [ -f ${current_dir}/local/update/o2server/$F ]
  28. then
  29. echo "update ${current_dir}/$F."
  30. cp -f -p ${current_dir}/local/update/o2server/$F ${current_dir}/
  31. fi
  32. done
  33. for A in "start" "stop" "restart" "console" "service"; do
  34. for B in "_windows.bat" "_windows_debug.bat" "_linux.sh" "_linux_debug.sh" "_linux_min.sh" "_macosx64.sh" "_macosx64_debug.sh" "_macosarm.sh" "_macosarm_debug.sh" "_arm.sh" "_arm_debug.sh" "_mips.sh" "_mips_debug.sh" "_raspi.sh" "_raspi_debug.sh" "_sw.sh" "_sw_debug.sh"; do
  35. if [ -f ${current_dir}/local/update/o2server/$A$B ]; then
  36. echo "update ${current_dir}/$A$B."
  37. cp -f -p ${current_dir}/local/update/o2server/$A$B ${current_dir}/
  38. fi
  39. done
  40. done
  41. echo "update ${current_dir}/version.o2."
  42. cp ${current_dir}/local/update/o2server/version.o2 ${current_dir}/
  43. echo "clean local/update directory."
  44. rm -Rf ${current_dir}/local/update
  45. echo "the update is complete, please restart the server."
  46. exit 1
  47. fi
  48. fi
  49. setsid ${current_dir}/jvm/linux_java11/bin/java -javaagent:${current_dir}/console.jar -server -Djava.awt.headless=true -Xms1g -Xmx3g -XX:MinHeapFreeRatio=15 -XX:MaxHeapFreeRatio=30 -Duser.timezone=GMT+08 -XX:+HeapDumpOnOutOfMemoryError -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI --module-path=${current_dir}/commons/module_java11 --upgrade-module-path=${current_dir}/commons/module_java11/compiler.jar:${current_dir}/commons/module_java11/compiler-management.jar -jar ${current_dir}/console.jar