Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/config/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -2911,11 +2911,16 @@ func ConfigureOpenSSH(clf *CommandLineFlags, cfg *servicecfg.Config) error {
lib.SetInsecureDevMode(clf.InsecureMode)

// Apply command line --debug flag to override logger severity.
level := slog.LevelError
if clf.Debug {
cfg.SetLogLevel(slog.LevelDebug)
level = slog.LevelDebug
cfg.Debug = clf.Debug
}

// Ensure that the logging level is respected by the logger.
utils.InitLogger(utils.LoggingForDaemon, level)

if clf.AuthToken != "" {
// store the value of the --token flag:
cfg.SetToken(clf.AuthToken)
Expand Down
2 changes: 1 addition & 1 deletion lib/openssh/sshd.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ func defaultRestart() error {
}

const activeService = "ActiveState=active"
if !bytes.Equal([]byte(activeService), out) {
if !bytes.Equal([]byte(activeService), bytes.TrimSpace(out)) {
slog.DebugContext(context.Background(), "skipping inactive OpenSSH service", "service", service)
continue
}
Expand Down
Loading