From f93dba9d30679fee5a65f57b71c87c3694d50231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Mon, 11 Jan 2021 19:07:26 +0800 Subject: [PATCH] =?UTF-8?q?[systemd]systemd=E6=9C=8D=E5=8A=A1=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E8=87=AA=E5=8A=A8=E9=94=99=E8=AF=AF=E9=87=8D=E5=90=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/utils/service_linux.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/utils/service_linux.go b/internal/utils/service_linux.go index 86f6489..7d43ed6 100644 --- a/internal/utils/service_linux.go +++ b/internal/utils/service_linux.go @@ -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