diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-02-12 16:17:01 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-02-12 16:17:01 +0300 |
commit | 25c9a0571b011674192032ac829120133914dca3 (patch) | |
tree | 13b77000b66f4cdcf7e3f99dea176de327734ea9 /daemon.go | |
parent | bbb533e354b00fdc86ace6901dfddd5d8801a8ba (diff) |
Make verify happy
Diffstat (limited to 'daemon.go')
-rw-r--r-- | daemon.go | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -1,17 +1,16 @@ package main import ( + "encoding/json" "log" "os" "os/exec" - "os/user" - - "encoding/json" - "fmt" - "github.com/kardianos/osext" "os/signal" + "os/user" "strconv" "syscall" + + "github.com/kardianos/osext" ) const daemonRunProgram = "daemon-run" @@ -21,7 +20,7 @@ func daemonMain() { return } - fmt.Printf("Starting the daemon as unprivileged user (uid: %d, gid: %d)...\n", syscall.Getuid(), syscall.Getgid()) + log.Printf("Starting the daemon as unprivileged user (uid: %d, gid: %d)...", syscall.Getuid(), syscall.Getgid()) // read the configuration from the pipe "ExtraFiles" var config appConfig @@ -113,7 +112,7 @@ func daemonize(config appConfig, cmdUser string) { log.Fatalln(err) } }() - fmt.Printf("Running the daemon as unprivileged user: %v...\n", cmdUser) + log.Printf("Running the daemon as unprivileged user: %v...", cmdUser) cmd, err := daemonReexec(cmdUser, daemonRunProgram) if err != nil { |