| | |
| | | StopServer(config.Server.ScriptPath) |
| | | time.Sleep(time.Second * 1) |
| | | StartServer(config.Server.ScriptPath) |
| | | result := strings.Split("=", GetLocalStartupItem(config.Server.ScriptPath, StartServerScript))[1] |
| | | util.ResponseFormat(c, code.Success, result) |
| | | fmt.Println("GetLocalStartupItem: ", GetLocalStartupItem(config.Server.ScriptPath, StartServerScript)) |
| | | //result := strings.Split("=", GetLocalStartupItem(config.Server.ScriptPath, StartServerScript))[1] |
| | | //util.ResponseFormat(c, code.Success, result) |
| | | } |
| | | |
| | | //启动服务 |
| | |
| | | //获取本地启动项 |
| | | func GetLocalStartupItem(scriptPath string, scriptFile string) string { |
| | | startupItem := GetNowLineContent(scriptPath+"/"+scriptFile, Option) |
| | | fmt.Println(startupItem) |
| | | fmt.Println("startupItem: ", startupItem) |
| | | return startupItem |
| | | } |
| | | |