mirror of
https://github.com/qdm12/gluetun.git
synced 2026-05-07 04:20:12 +02:00
fix(openvpn): only log openvpn version corresponding to OPENVPN_VERSION
This commit is contained in:
+6
-2
@@ -22,6 +22,7 @@ import (
|
|||||||
"github.com/qdm12/gluetun/internal/configuration/sources/files"
|
"github.com/qdm12/gluetun/internal/configuration/sources/files"
|
||||||
"github.com/qdm12/gluetun/internal/configuration/sources/secrets"
|
"github.com/qdm12/gluetun/internal/configuration/sources/secrets"
|
||||||
"github.com/qdm12/gluetun/internal/constants"
|
"github.com/qdm12/gluetun/internal/constants"
|
||||||
|
copenvpn "github.com/qdm12/gluetun/internal/constants/openvpn"
|
||||||
"github.com/qdm12/gluetun/internal/dns"
|
"github.com/qdm12/gluetun/internal/dns"
|
||||||
"github.com/qdm12/gluetun/internal/firewall"
|
"github.com/qdm12/gluetun/internal/firewall"
|
||||||
"github.com/qdm12/gluetun/internal/healthcheck"
|
"github.com/qdm12/gluetun/internal/healthcheck"
|
||||||
@@ -269,11 +270,14 @@ func _main(ctx context.Context, buildInfo models.BuildInformation,
|
|||||||
ovpnConf := openvpn.New(
|
ovpnConf := openvpn.New(
|
||||||
logger.New(log.SetComponent("openvpn configurator")),
|
logger.New(log.SetComponent("openvpn configurator")),
|
||||||
cmder, puid, pgid)
|
cmder, puid, pgid)
|
||||||
|
ovpnVersion := ovpnConf.Version26
|
||||||
|
if allSettings.VPN.OpenVPN.Version == copenvpn.Openvpn25 {
|
||||||
|
ovpnVersion = ovpnConf.Version25
|
||||||
|
}
|
||||||
|
|
||||||
err = printVersions(ctx, logger, []printVersionElement{
|
err = printVersions(ctx, logger, []printVersionElement{
|
||||||
{name: "Alpine", getVersion: alpineConf.Version},
|
{name: "Alpine", getVersion: alpineConf.Version},
|
||||||
{name: "OpenVPN 2.5", getVersion: ovpnConf.Version25},
|
{name: "OpenVPN", getVersion: ovpnVersion},
|
||||||
{name: "OpenVPN 2.6", getVersion: ovpnConf.Version26},
|
|
||||||
{name: "IPtables", getVersion: firewallConf.Version},
|
{name: "IPtables", getVersion: firewallConf.Version},
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user