mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-09 20:10:27 +08:00
[systemd]systemd服务设置自动错误重启
This commit is contained in:
@@ -123,9 +123,12 @@ func (this *ServiceManager) installSystemdService(systemd, exePath string, args
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=` + longName + ` Service
|
Description=` + longName + ` Service
|
||||||
Before=shutdown.target
|
Before=shutdown.target
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
|
Restart=always
|
||||||
|
RestartSec=1s
|
||||||
ExecStart=` + exePath + ` start
|
ExecStart=` + exePath + ` start
|
||||||
ExecStop=` + exePath + ` stop
|
ExecStop=` + exePath + ` stop
|
||||||
ExecReload=` + exePath + ` reload
|
ExecReload=` + exePath + ` reload
|
||||||
|
|||||||
Reference in New Issue
Block a user