Commit 811de8b8 authored by Manuel Buil's avatar Manuel Buil

Fix bug when using tailscale config by file

Signed-off-by: 's avatarManuel Buil <mbuil@suse.com>
parent 80978b5b
......@@ -90,16 +90,16 @@ func Run(ctx *cli.Context) error {
contextCtx := signals.SetupSignalContext()
go cmds.WriteCoverage(contextCtx)
if cmds.AgentConfig.VPNAuthFile != "" {
cmds.AgentConfig.VPNAuth, err = util.ReadFile(cmds.AgentConfig.VPNAuthFile)
if cfg.VPNAuthFile != "" {
cfg.VPNAuth, err = util.ReadFile(cfg.VPNAuthFile)
if err != nil {
return err
}
}
// Starts the VPN in the agent if config was set up
if cmds.AgentConfig.VPNAuth != "" {
err := vpn.StartVPN(cmds.AgentConfig.VPNAuth)
if cfg.VPNAuth != "" {
err := vpn.StartVPN(cfg.VPNAuth)
if err != nil {
return err
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment