mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-04 01:07:49 +02:00
cmd/cli: handle stop signal from service manager
So using "ctrld stop" or service manager to stop ctrld will end up with the same result, stopped ctrld with a working DNS, and deactivation pin code will always have effects if set.
This commit is contained in:
committed by
Cuong Manh Le
parent
dacc67e50f
commit
c6365e6b74
@@ -22,7 +22,7 @@ func selfUninstall(p *prog, logger zerolog.Logger) {
|
||||
logger.Fatal().Err(err).Msg("could not determine executable")
|
||||
}
|
||||
args := []string{"uninstall"}
|
||||
if !deactivationPinNotSet() {
|
||||
if deactivationPinSet() {
|
||||
args = append(args, fmt.Sprintf("--pin=%d", cdDeactivationPin.Load()))
|
||||
}
|
||||
cmd := exec.Command(bin, args...)
|
||||
|
||||
Reference in New Issue
Block a user