mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-04 01:07:49 +02:00
fix os.Resolve method to prefer LAN answers
fix os.Resolve method to prefer LAN answers early return for stop cmd when not installed or stopped increase service restart delay to 5s
This commit is contained in:
@@ -561,6 +561,17 @@ func initStopCmd() *cobra.Command {
|
||||
}
|
||||
|
||||
initLogging()
|
||||
|
||||
status, err := s.Status()
|
||||
if errors.Is(err, service.ErrNotInstalled) {
|
||||
mainLog.Load().Warn().Msg("service not installed")
|
||||
return
|
||||
}
|
||||
if status == service.StatusStopped {
|
||||
mainLog.Load().Warn().Msg("service is already stopped")
|
||||
return
|
||||
}
|
||||
|
||||
if err := checkDeactivationPin(s, nil); isCheckDeactivationPinErr(err) {
|
||||
os.Exit(deactivationPinInvalidExitCode)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user