Browse Source

Merge pull request #79 from zcash-hackworks/create_log_file

Add initial conditional to create log file if it does not exist
service_pr
Marshall Gaucher 5 years ago
committed by GitHub
parent
commit
4b6b77336a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  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