eliminate extra ; when creating ingress followed by egress

This commit is contained in:
Matthew R. Kasun
2022-09-26 13:55:08 -04:00
parent 45850ef4a1
commit 24f78b172e

View File

@@ -87,12 +87,12 @@ func CreateEgressGateway(gateway models.EgressGatewayRequest) (models.Node, erro
} }
if node.PostUp != "" { if node.PostUp != "" {
if !strings.Contains(node.PostUp, postUpCmd) { if !strings.Contains(node.PostUp, postUpCmd) {
postUpCmd = node.PostUp + " ; " + postUpCmd postUpCmd = node.PostUp + postUpCmd
} }
} }
if node.PostDown != "" { if node.PostDown != "" {
if !strings.Contains(node.PostDown, postDownCmd) { if !strings.Contains(node.PostDown, postDownCmd) {
postDownCmd = node.PostDown + " ; " + postDownCmd postDownCmd = node.PostDown + postDownCmd
} }
} }