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

This commit is contained in:
刘祥超
2021-01-11 19:07:26 +08:00
parent 6fd9fefb8f
commit f93dba9d30

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