help.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/sh
  2. set -e
  3. GRAY='\033[1;30m'
  4. GREEN='\033[0;32m'
  5. BLUE='\033[0;34m'
  6. YELLOW='\033[0;33m'
  7. # shellcheck disable=SC2039
  8. echo -e "${YELLOW}一些常用的命令脚本:${NC}"
  9. echo -e "${GRAY}查看所有服务状态${NC}"
  10. # shellcheck disable=SC2039
  11. echo -e "${GREEN}sudo systemctl status server.service game.service${NC}"
  12. # shellcheck disable=SC2039
  13. echo -e "${GRAY}重启后端服务${NC}"
  14. # shellcheck disable=SC2039
  15. echo -e "${GREEN}sudo systemctl restart server.service${NC}"
  16. # shellcheck disable=SC2039
  17. echo -e "${GRAY}重启游戏服务器${NC}"
  18. # shellcheck disable=SC2039
  19. echo -e "${GREEN}sudo systemctl restart game.service${NC}"
  20. # shellcheck disable=SC2039
  21. echo -e "${GRAY}监听后端服务实时日志${NC}"
  22. # shellcheck disable=SC2039
  23. echo -e "${GREEN}sudo journalctl -fu server.service${NC}"
  24. # shellcheck disable=SC2039
  25. echo -e "${GRAY}监听游戏服务器实时日志${NC}"
  26. # shellcheck disable=SC2039
  27. echo -e "${GREEN}sudo journalctl -fu game.service${NC}"
  28. # shellcheck disable=SC2039
  29. echo -e "${GRAY}重启Nginx服务${NC}"
  30. # shellcheck disable=SC2039
  31. echo -e "${GREEN}sudo systemctl restart nginx.service${NC}"
  32. # shellcheck disable=SC2039