summaryrefslogtreecommitdiff
path: root/cmd/dgrep
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/dgrep')
-rw-r--r--cmd/dgrep/main.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/cmd/dgrep/main.go b/cmd/dgrep/main.go
index c0a91eb..0002c89 100644
--- a/cmd/dgrep/main.go
+++ b/cmd/dgrep/main.go
@@ -30,6 +30,7 @@ func main() {
userName := user.Name()
flag.BoolVar(&args.NoColor, "noColor", false, "Disable ANSII terminal colors")
+ flag.BoolVar(&args.NoAuthKey, "no-auth-key", false, "Disable auth-key fast reconnect feature")
flag.BoolVar(&args.Quiet, "quiet", false, "Quiet output mode")
flag.BoolVar(&args.RegexInvert, "invert", false, "Invert regex")
flag.BoolVar(&args.Plain, "plain", false, "Plain output mode")
@@ -48,13 +49,14 @@ func main() {
flag.StringVar(&args.Logger, "logger", config.DefaultClientLogger, "Logger name")
flag.StringVar(&args.LogLevel, "logLevel", config.DefaultLogLevel, "Log level")
flag.StringVar(&args.SSHPrivateKeyFilePath, "key", "", "Path to private key")
+ flag.StringVar(&args.SSHPrivateKeyFilePath, "auth-key-path", "", "Path to auth key/private key (default ~/.ssh/id_rsa)")
flag.StringVar(&args.RegexStr, "regex", ".", "Regular expression")
flag.StringVar(&args.ServersStr, "servers", "", "Remote servers to connect")
flag.StringVar(&args.UserName, "user", userName, "Your system user name")
flag.StringVar(&args.What, "files", "", "File(s) to read")
flag.StringVar(&grep, "grep", "", "Alias for -regex")
flag.StringVar(&pprof, "pprof", "", "Start PProf server this address")
-
+
// Add profiling flags
profiling.AddFlags(&profileFlags)
@@ -96,15 +98,15 @@ func main() {
}
status := client.Start(ctx, signal.InterruptCh(ctx))
-
+
// Log final metrics if profiling is enabled
if profileFlags.Enabled() {
profiler.LogMetrics("shutdown")
}
-
+
// Stop profiler before exit
profiler.Stop()
-
+
cancel()
wg.Wait()