开发提交

This commit is contained in:
langhuihui
2021-01-11 23:08:15 +08:00
parent 3db1a0c435
commit ca016d834b
21 changed files with 374 additions and 863 deletions

13
util/linux.go Normal file
View File

@@ -0,0 +1,13 @@
// +build !windows
package util
import (
"fmt"
"io/ioutil"
"os"
)
func CreateShutdownScript() error{
return ioutil.WriteFile("shutdown.sh", []byte(fmt.Sprintf("kill -9 %d", os.Getpid())), 0777)
}