start_arm.sh 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/bin/bash
  2. # Copyright (c) http://www.o2oa.net/
  3. current_dir="$(
  4. cd "$(dirname "$0")"
  5. pwd
  6. )"
  7. cd ${current_dir}
  8. if [ -d ${current_dir}/local/update ]; then
  9. for D in commons configSample localSample jvm servers store config local; do
  10. if [ ! -d ${current_dir}/$D ]; then
  11. mkdir ${current_dir}/commons
  12. fi
  13. done
  14. if [ -f ${current_dir}/local/update/o2server/version.o2 ]; then
  15. echo 'update o2server.'
  16. for D in commons configSample localSample jvm servers store; do
  17. if [ -d ${current_dir}/local/update/o2server/$D ]; then
  18. echo "update ${current_dir}/$D."
  19. cp -Rf -p ${current_dir}/local/update/o2server/$D ${current_dir}/
  20. fi
  21. done
  22. for F in console.jar index.html src.zip; do
  23. if [ -f ${current_dir}/local/update/o2server/$F ]; then
  24. echo "update ${current_dir}/$F."
  25. cp -f -p ${current_dir}/local/update/o2server/$F ${current_dir}/
  26. fi
  27. done
  28. for A in "start" "stop" "restart" "console" "service"; do
  29. for B in "_windows.bat" "_linux.sh" "_linux_min.sh" "_macos.sh" "_arm.sh" "_mips.sh" "_raspi.sh" "_aix.sh"; do
  30. if [ -f ${current_dir}/local/update/o2server/$A$B ]; then
  31. echo "update ${current_dir}/$A$B."
  32. cp -f -p ${current_dir}/local/update/o2server/$A$B ${current_dir}/
  33. fi
  34. done
  35. done
  36. echo "update ${current_dir}/version.o2."
  37. cp ${current_dir}/local/update/o2server/version.o2 ${current_dir}/
  38. echo "clean local/update directory."
  39. rm -Rf ${current_dir}/local/update
  40. echo "the update is complete, please restart the server."
  41. exit 1
  42. fi
  43. fi
  44. setsid ${current_dir}/jvm/arm_java11/bin/java -Dnashorn.args=--no-deprecation-warning --add-exports jdk.scripting.nashorn/jdk.nashorn.internal.runtime=ALL-UNNAMED --add-exports jdk.scripting.nashorn/jdk.nashorn.internal.runtime.arrays=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED -javaagent:${current_dir}/console.jar -server -Djava.awt.headless=true -Xms2g -Xmx8g -Duser.timezone=GMT+08 -XX:+HeapDumpOnOutOfMemoryError -jar ${current_dir}/console.jar