MCPcopy Index your code
hub / github.com/GoEdgeLab/EdgeNode / InstallSystemService

Method InstallSystemService

internal/nodes/node.go:302–316  ·  view source on GitHub ↗

InstallSystemService 安装系统服务

()

Source from the content-addressed store, hash-verified

300
301// InstallSystemService 安装系统服务
302func (this *Node) InstallSystemService() error {
303 shortName := teaconst.SystemdServiceName
304
305 exe, err := os.Executable()
306 if err != nil {
307 return err
308 }
309
310 manager := utils.NewServiceManager(shortName, teaconst.ProductName)
311 err = manager.Install(exe, []string{})
312 if err != nil {
313 return err
314 }
315 return nil
316}
317
318// 读取API配置
319func (this *Node) syncConfig(taskVersion int64) error {

Callers 1

mainFunction · 0.80

Calls 2

InstallMethod · 0.95
NewServiceManagerFunction · 0.92

Tested by

no test coverage detected