Commit 561069fd authored by Matt Holt's avatar Matt Holt Committed by GitHub

Merge pull request #1211 from mholt/LogStartupCmd

Log Startup and Shutdown Commands
parents 2b9bbc52 66a07773
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