app-server.service 700 B

123456789101112131415161718192021222324252627
  1. [Unit]
  2. Description=WildfirechatAPP
  3. Documentation=https://docs.wildfirechat.cn
  4. Wants=network-online.target
  5. After=network-online.target
  6. [Service]
  7. WorkingDirectory=/opt/app-server
  8. #ExecStart=/usr/bin/java -server -Xmx2G -Xms2G -jar app-server.jar 2>&1
  9. ExecStart=/usr/bin/java -server -jar app-server.jar 2>&1
  10. # Let systemd restart this service always
  11. Restart=always
  12. RestartSec=5
  13. # Specifies the maximum file descriptor number that can be opened by this process
  14. LimitNOFILE=65536
  15. # Specifies the maximum number of threads this process can create
  16. TasksMax=infinity
  17. # Disable timeout logic and wait until process is stopped
  18. TimeoutStopSec=infinity
  19. SendSIGKILL=no
  20. [Install]
  21. WantedBy=multi-user.target