diff options
| author | Paul Buetow <paul@buetow.org> | 2021-10-06 10:55:50 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2021-10-06 10:55:50 +0300 |
| commit | 7306afe9ab073c424ddca0ddc57950f237948118 (patch) | |
| tree | 063c7181425f0657ec97e415c0224d311bafe6c5 /internal/config/initializer.go | |
| parent | fab5dc3e70434ea0abc7a0976487a1973b662331 (diff) | |
move health check to separate client binary
Diffstat (limited to 'internal/config/initializer.go')
| -rw-r--r-- | internal/config/initializer.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/internal/config/initializer.go b/internal/config/initializer.go index a58f82a..ec758c8 100644 --- a/internal/config/initializer.go +++ b/internal/config/initializer.go @@ -96,11 +96,19 @@ func (c *initializer) transformConfig(sourceProcess source.Source, args *Args, a common.SSHPort = args.SSHPort } - if args.Discovery == "" && args.ServersStr == "" { + if args.Discovery == "" && (args.ServersStr == "" || + strings.ToLower(args.ServersStr) == "serverless") { // We are not connecting to any servers. args.Serverless = true } + if sourceProcess == source.HealthCheck { + args.TrustAllHosts = true + if !args.Serverless && strings.ToLower(args.ServersStr) == "" { + args.ServersStr = fmt.Sprintf("localhost:%d", DefaultSSHPort) + } + } + // Interpret additional args as file list. if args.What == "" { var files []string |
