MCPcopy Index your code
hub / github.com/opencloud-eu/opencloud / Stop

Function Stop

tests/ocwrapper/opencloud/opencloud.go:116–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

114}
115
116func Stop() (bool, string) {
117 log.Println("Stopping OpenCloud server...")
118 stopSignal = true
119
120 if cmd == nil {
121 return true, "OpenCloud server is not running"
122 }
123
124 err := cmd.Process.Signal(syscall.SIGINT)
125 if err != nil {
126 if !strings.HasSuffix(err.Error(), "process already finished") {
127 log.Fatalln(err)
128 } else {
129 return true, "OpenCloud server is already stopped"
130 }
131 }
132 cmd.Process.Wait()
133 success, message := waitUntilCompleteShutdown()
134
135 cmd = nil
136 return success, message
137}
138
139func Restart(envMap []string) (bool, string) {
140 Stop()

Callers 1

RestartFunction · 0.85

Calls 2

ErrorMethod · 0.45

Tested by

no test coverage detected