[systemd]systemd服务设置自动错误重启

This commit is contained in:
GoEdgeLab
2021-01-11 19:07:26 +08:00
parent 93d911b10b
commit ceeee5802b

View File

@@ -123,9 +123,12 @@ func (this *ServiceManager) installSystemdService(systemd, exePath string, args
[Unit]
Description=` + longName + ` Service
Before=shutdown.target
After=network-online.target
[Service]
Type=forking
Restart=always
RestartSec=1s
ExecStart=` + exePath + ` start
ExecStop=` + exePath + ` stop
ExecReload=` + exePath + ` reload