service: add missing imports

This commit is contained in:
Daniel Theophanes
2017-05-10 12:40:35 -07:00
parent a37cd5efa8
commit f6635a45ec
+3 -1
View File
@@ -8,7 +8,9 @@ import (
"errors" "errors"
"fmt" "fmt"
"os" "os"
"os/exec"
"os/signal" "os/signal"
"strings"
"text/template" "text/template"
"time" "time"
) )
@@ -19,7 +21,7 @@ func isUpstart() bool {
} }
if _, err := os.Stat("/sbin/init"); err == nil { if _, err := os.Stat("/sbin/init"); err == nil {
if out, err := exec.Command("/sbin/init", "--version").Output(); err == nil { if out, err := exec.Command("/sbin/init", "--version").Output(); err == nil {
if strings.Contains(string(out),"init (upstart") { if strings.Contains(string(out), "init (upstart") {
return true return true
} }
} }