fix postup & postdown bug
This commit is contained in:
parent
a53a85618f
commit
f39ae22b27
|
|
@ -36,11 +36,14 @@ func BuildClientConfig(client model.Client, server model.Server, setting model.G
|
||||||
clientPrivateKey + "\n" +
|
clientPrivateKey + "\n" +
|
||||||
clientDNS + "\n\n"
|
clientDNS + "\n\n"
|
||||||
|
|
||||||
if client.HasPrivateSubnet {
|
if client.PostUp != "" {
|
||||||
clientPostUp := fmt.Sprintf("PostUp = %s", client.PostUp)
|
clientPostUp := fmt.Sprintf("PostUp = %s", client.PostUp)
|
||||||
|
strConfig += clientPostUp + "\n"
|
||||||
|
}
|
||||||
|
|
||||||
|
if client.PostDown != "" {
|
||||||
clientPostDown := fmt.Sprintf("PostDown = %s", client.PostDown)
|
clientPostDown := fmt.Sprintf("PostDown = %s", client.PostDown)
|
||||||
strConfig += clientPostUp + "\n" +
|
strConfig += clientPostDown + "\n\n"
|
||||||
clientPostDown + "\n\n"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
strConfig += "[Peer]" + "\n" +
|
strConfig += "[Peer]" + "\n" +
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue