mirror of
https://github.com/Monibuca/engine.git
synced 2025-10-06 09:06:52 +08:00
开发提交
This commit is contained in:
13
util/linux.go
Normal file
13
util/linux.go
Normal 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)
|
||||
}
|
Reference in New Issue
Block a user