diff options
Diffstat (limited to 'conf/writer.go')
-rw-r--r-- | conf/writer.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/conf/writer.go b/conf/writer.go index 365e65e9..6b16f843 100644 --- a/conf/writer.go +++ b/conf/writer.go @@ -41,6 +41,19 @@ func (conf *Config) ToWgQuick() string { output.WriteString(fmt.Sprintf("MTU = %d\n", conf.Interface.MTU)) } + if len(conf.Interface.PreUp) > 0 { + output.WriteString(fmt.Sprintf("PreUp = %s\n", conf.Interface.PreUp)) + } + if len(conf.Interface.PostUp) > 0 { + output.WriteString(fmt.Sprintf("PostUp = %s\n", conf.Interface.PostUp)) + } + if len(conf.Interface.PreDown) > 0 { + output.WriteString(fmt.Sprintf("PreDown = %s\n", conf.Interface.PreDown)) + } + if len(conf.Interface.PostDown) > 0 { + output.WriteString(fmt.Sprintf("PostDown = %s\n", conf.Interface.PostDown)) + } + for _, peer := range conf.Peers { output.WriteString("\n[Peer]\n") |