From 9199b0e4d473f9af902595c386d4e46af282f50c Mon Sep 17 00:00:00 2001 From: Massimiliano Adamo <maxadamo@gmail.com> Date: Wed, 31 Aug 2022 23:36:12 +0200 Subject: [PATCH] add debug --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index a38067a..57787e4 100644 --- a/main.go +++ b/main.go @@ -72,7 +72,7 @@ func triggerPuppet(w http.ResponseWriter, req *http.Request) { cmd := exec.Command("/usr/bin/pkill", "-f", "/opt/puppetlabs/puppet/bin/puppet", "-s", "SIGUSR1") authToken := strings.Split(req.Header.Get("Authorization"), "Bearer ")[1] statusFile := "/tmp/200.json" - + fmt.Fprintf(w, "Welcome, "+authToken+"\r\n") // create json files on the fly okMsg := []byte("{\n \"status\": \"OK\",\n \"response\": 200\n }") koMsg := []byte("{\n \"status\": \"KO\",\n \"response\": 503\n }") -- GitLab