From 2c604297241cd6c3338dbf7d7f297bb4b78b1ff6 Mon Sep 17 00:00:00 2001 From: Ioannis Dressos <96877388+idressos@users.noreply.github.com> Date: Sun, 29 Oct 2023 16:10:45 +0200 Subject: [PATCH] Make interface PostUp & PostDown settings optional in wg.conf --- templates/wg.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/wg.conf b/templates/wg.conf index 258cefa..1b71f7f 100644 --- a/templates/wg.conf +++ b/templates/wg.conf @@ -8,8 +8,8 @@ Address = {{$first :=true}}{{range .serverConfig.Interface.Addresses }}{{if $fir ListenPort = {{ .serverConfig.Interface.ListenPort }} PrivateKey = {{ .serverConfig.KeyPair.PrivateKey }} {{if .globalSettings.MTU}}MTU = {{ .globalSettings.MTU }}{{end}} -PostUp = {{ .serverConfig.Interface.PostUp }} -PostDown = {{ .serverConfig.Interface.PostDown }} +{{if .serverConfig.Interface.PostUp }}PostUp = {{ .serverConfig.Interface.PostUp }}{{end}} +{{if .serverConfig.Interface.PostDown }}PostDown = {{ .serverConfig.Interface.PostDown }}{{end}} Table = {{ .globalSettings.Table }} {{range .clientDataList}}{{if eq .Client.Enabled true}}