diff --git a/pkg/haproxy/main.go b/pkg/haproxy/main.go index 5d7da05c..6373fce3 100644 --- a/pkg/haproxy/main.go +++ b/pkg/haproxy/main.go @@ -41,6 +41,7 @@ func New(osArgs utils.OSArgs, env env.Env, cfgFile []byte, p process.Process, cl if osArgs.External { cfgFile = []byte(strings.ReplaceAll(string(cfgFile), "/var/run/haproxy-runtime-api.sock", h.RuntimeSocket)) + cfgFile = []byte(strings.ReplaceAll(string(cfgFile), "pidfile /var/run/haproxy.pid", "pidfile "+h.PIDFile)) } err = renameio.WriteFile(h.MainCFGFile, cfgFile, 0o755)