Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/hotfix-config-file-path' into ho…
Browse files Browse the repository at this point in the history
…tfix-config-file-path

# Conflicts:
#	vpn/backend.go
  • Loading branch information
rasmim committed Aug 16, 2021
2 parents 92d3290 + 7c60623 commit 6261f61
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions vpn/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,9 @@ func (w *wireguard) GenPublicKey(ctx context.Context, r *pb.PubKeyReq) (*pb.PubK
// check whether private key exists or not, if not generate one
if _, err := os.Stat(w.config.WgConfig.Dir + r.PrivKeyName + "_pub"); os.IsNotExist(err) {
fmt.Printf("PrivateKeyFile is not exists, creating one ... %s\n", r.PrivKeyName)
privKey, err := generatePrivateKey(w.config.WgConfig.Dir + r.PrivKeyName + "_priv")
_, err := generatePrivateKey(w.config.WgConfig.Dir + r.PrivKeyName + "_priv")
if err != nil {
log.Error().Err(err).Str("Privatekey: %s ", privKey).Msg("Problem in generation of private key")
return &pb.PubKeyResp{Message: "Error"}, fmt.Errorf("error in generation of private key %v", err)

}
}

Expand Down

0 comments on commit 6261f61

Please sign in to comment.