Commit 66a07773 authored by Toby Allen's avatar Toby Allen

Log Startup and Shutdown Commands

parent 2b9bbc52
package startupshutdown
import (
"log"
"os"
"os/exec"
"strings"
......@@ -53,8 +54,10 @@ func registerCallback(c *caddy.Controller, registerFunc func(func() error)) erro
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
if nonblock {
log.Printf("[INFO] Nonblocking Command:\"%s %s\"", command, strings.Join(args, " "))
return cmd.Start()
}
log.Printf("[INFO] Blocking Command:\"%s %s\"", command, strings.Join(args, " "))
return cmd.Run()
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment