Browse Source

Add initial conditional to create log file if it does not exist

service_pr
mdr0id 5 years ago
parent
commit
86b915288c
  1. 3
      cmd/server/main.go

3
cmd/server/main.go

@ -123,6 +123,9 @@ func main() {
}
for _, filename := range filesThatShouldExist {
if !fileExists(opts.logPath) {
os.OpenFile(opts.logPath, os.O_RDWR|os.O_CREATE|os.O_EXCL, 0666)
}
if (opts.veryInsecure && (filename == opts.tlsCertPath || filename == opts.tlsKeyPath)) {
continue
}

Loading…
Cancel
Save