From df85c5237656f02a1bbc58e964701843f9e191f7 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 12 Oct 2024 22:16:52 -0500 Subject: [PATCH] add /kill Signed-off-by: Jeff Carr --- http.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/http.go b/http.go index 44cfc88..141082c 100644 --- a/http.go +++ b/http.go @@ -3,6 +3,7 @@ package main import ( "fmt" "net/http" + "os" "strings" "go.wit.com/log" @@ -32,6 +33,12 @@ func okHandler(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, j) return } + if tmp == "/kill" { + log.Warn("KILLED") + fmt.Fprintln(w, "KILLED") + os.Exit(-1) + return + } if tmp == "/vms" { s := poolHypervisor(hv)