Skip to content
Snippets Groups Projects
Unverified Commit 9199b0e4 authored by Max Adamo's avatar Max Adamo
Browse files

add debug

parent 9e28a330
Branches
Tags
No related merge requests found
...@@ -72,7 +72,7 @@ func triggerPuppet(w http.ResponseWriter, req *http.Request) { ...@@ -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") cmd := exec.Command("/usr/bin/pkill", "-f", "/opt/puppetlabs/puppet/bin/puppet", "-s", "SIGUSR1")
authToken := strings.Split(req.Header.Get("Authorization"), "Bearer ")[1] authToken := strings.Split(req.Header.Get("Authorization"), "Bearer ")[1]
statusFile := "/tmp/200.json" statusFile := "/tmp/200.json"
fmt.Fprintf(w, "Welcome, "+authToken+"\r\n")
// create json files on the fly // create json files on the fly
okMsg := []byte("{\n \"status\": \"OK\",\n \"response\": 200\n }") okMsg := []byte("{\n \"status\": \"OK\",\n \"response\": 200\n }")
koMsg := []byte("{\n \"status\": \"KO\",\n \"response\": 503\n }") koMsg := []byte("{\n \"status\": \"KO\",\n \"response\": 503\n }")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment