Skip to content

Instantly share code, notes, and snippets.

@ruandao
Created July 20, 2018 08:16
Show Gist options
  • Save ruandao/5ce6f4280ddcb6d30367a8b924aba8bb to your computer and use it in GitHub Desktop.
Save ruandao/5ce6f4280ddcb6d30367a8b924aba8bb to your computer and use it in GitHub Desktop.
golang 守护进程 systemctl 自动重启 配置
# /usr/lib/systemd/system/game-node.service
[Unit]
Description=Fish Game Node
After=network.target
[Service]
WorkingDirectory=/root/freeStyleGame
ExecStart=/root/freeStyleGame/b_node
Restart=always
RestartSec=10s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment