From af6ba9180c340cc7861ad6529827291a1bfd5267 Mon Sep 17 00:00:00 2001 From: cdle <798731886@qq.com> Date: Fri, 1 Oct 2021 21:09:08 +0800 Subject: [PATCH] update --- core/sys.go | 3 +-- core/test.go | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/core/sys.go b/core/sys.go index 5164e54..071713b 100644 --- a/core/sys.go +++ b/core/sys.go @@ -15,7 +15,7 @@ import ( var BeforeStop = []func(){} -var pidf = "/var/run/sillyGirl.pid" +var pidf = "/var/run/" + pname + ".pid" func Daemon() { for _, bs := range BeforeStop { @@ -62,7 +62,6 @@ func GitPull(filename string) (bool, error) { func CompileCode() error { cmd := exec.Command("sh", "-c", "cd "+ExecPath+" && go build -o "+pname) - NotifyMasters(os.Args[0] + " " + pname) _, err := cmd.Output() if err != nil { return errors.New("编译失败:" + err.Error() + "。") diff --git a/core/test.go b/core/test.go index b94979c..2f699b4 100644 --- a/core/test.go +++ b/core/test.go @@ -232,8 +232,8 @@ func initSys() { service := ` [Service] Type=forking -ExecStart=` + ExecPath + "/sillyGirl" + ` -d -PIDFile=/var/run/sillyGirl.pid +ExecStart=` + ExecPath + "/" + pname + ` -d +PIDFile=/var/run/` + pname + `.pid Restart=always User=root Group=root