Skip to content
This repository was archived by the owner on Jul 28, 2020. It is now read-only.

Commit e7695a3

Browse files
Andreas Voellmerxtreme-stevehiehn
authored andcommitted
use cmd to stop service with sc delete
Signed-off-by: Steve Hiehn <[email protected]>
1 parent 449ac21 commit e7695a3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

daemon/winsw_windows.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,16 @@ func (w *WinSW) Stop(label string) error {
9999
fmt.Printf("DEBUG: %v IS RUNNING\n", label)
100100
_, executablePath = getServicePaths(label, w.ServicesDir)
101101

102-
cmd := exec.Command(executablePath, "stop")
103-
err := runCommand(cmd)
102+
//cmd := exec.Command(executablePath, "stop")
103+
//err := runCommand(cmd)
104+
//sc delete org.cloudfoundry.cfdev.vpnkit
105+
cmd := exec.Command("cmd", "/C", "sc", "delete", "org.cloudfoundry.cfdev.vpnkit")
106+
output, err := cmd.CombinedOutput()
107+
fmt.Printf("DEBUG: %v OUTPUT FROM %v sc delete: \n", output)
104108
if err != nil {
105109
return err
106110
}
111+
107112
fmt.Printf("DEBUG: %v SHOULD HAVE STOPPED\n", executablePath)
108113
time.Sleep(2 * time.Second)
109114
running, _ = w.IsRunning(label)

0 commit comments

Comments
 (0)