Skip to content

Commit

Permalink
Delete outdated nginx log deletion (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
codygibb authored Oct 7, 2020
1 parent 6d7aff5 commit d580075
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions agent/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"flag"
"fmt"
"net/http"
"os"
"time"

"github.com/uber/kraken/agent/agentserver"
Expand Down Expand Up @@ -224,17 +223,6 @@ func Run(flags *Flags, opts ...Option) {

go heartbeat(stats)

// Wipe log files created by the old nginx process which ran as root.
// TODO(codyg): Swap these with the v2 log files once they are deleted.
for _, name := range []string{
"/var/log/kraken/kraken-agent/nginx-access.log",
"/var/log/kraken/kraken-agent/nginx-error.log",
} {
if err := os.Remove(name); err != nil && !os.IsNotExist(err) {
log.Warnf("Could not remove old root-owned nginx log: %s", err)
}
}

log.Fatal(nginx.Run(config.Nginx, map[string]interface{}{
"allowed_cidrs": config.AllowedCidrs,
"port": flags.AgentRegistryPort,
Expand Down

0 comments on commit d580075

Please sign in to comment.