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

This commit is contained in:
mdr0id 2019-09-23 16:13:32 -07:00
parent 6f01d40f2e
commit 86b915288c
1 changed files with 3 additions and 0 deletions

View File

@ -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
}