summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/config/logger.go6
-rw-r--r--pkg/helper/windows.go1
2 files changed, 6 insertions, 1 deletions
diff --git a/pkg/config/logger.go b/pkg/config/logger.go
index 09d96b7..cb78349 100644
--- a/pkg/config/logger.go
+++ b/pkg/config/logger.go
@@ -19,10 +19,16 @@ import (
"io"
"log"
"os"
+ "path"
)
//ConfigureLogger to write logs into a file as well as the stderr
func ConfigureLogger(logPath string) (io.Closer, error) {
+ dir := path.Dir(logPath)
+ err := os.MkdirAll(dir, 0700)
+ if err == nil {
+ log.Println("ERROR: cannot create data dir")
+ }
logFile, err := os.OpenFile(logPath, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
if err == nil {
log.SetOutput(io.MultiWriter(logFile, os.Stderr))
diff --git a/pkg/helper/windows.go b/pkg/helper/windows.go
index c33a4bc..43436ad 100644
--- a/pkg/helper/windows.go
+++ b/pkg/helper/windows.go
@@ -39,7 +39,6 @@ var (
LogFolder = getExecDir()
openvpnPath = path.Join(appPath, "openvpn.exe")
chocoOpenvpnPath = `C:\Program Files\OpenVPN\bin\openvpn.exe`
- platformOpenvpnFlags = []string{
httpServerConf = &httpConf{}
)