服务端心跳验证自启

1
2
3
4
5
6
7
8
9
10
[Unit]
Description=Heartbeat Server
After=network.target[Service]
Type=simple
ExecStart=/root/miniconda3/bin/python /opt/heart/heartbeat_server.py
Restart=always
RestartSec=5
User=root
WorkingDirectory=/opt/heart[Install]
WantedBy=multi-user.target

sudo systemctl daemon-reload

sudo systemctl start heartbeat

sudo systemctl enable heartbeat