Allow -test 0
This commit is contained in:
parent
982f341de8
commit
1e2c175e19
|
@ -136,7 +136,7 @@ func ConfigLoad(proxy *Proxy, svcFlag *string) error {
|
||||||
listAll := flag.Bool("list-all", false, "print the complete list of available resolvers, ignoring filters")
|
listAll := flag.Bool("list-all", false, "print the complete list of available resolvers, ignoring filters")
|
||||||
jsonOutput := flag.Bool("json", false, "output list as JSON")
|
jsonOutput := flag.Bool("json", false, "output list as JSON")
|
||||||
check := flag.Bool("check", false, "check the configuration file and exit")
|
check := flag.Bool("check", false, "check the configuration file and exit")
|
||||||
testGracePeriod := flag.Int("test", 0, "test that certificates of chosen servers are not going to expire before that number of minutes")
|
testGracePeriod := flag.Int("test", -1, "test that certificates of chosen servers are not going to expire before that number of minutes")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
if *svcFlag == "stop" || *svcFlag == "uninstall" {
|
if *svcFlag == "stop" || *svcFlag == "uninstall" {
|
||||||
return nil
|
return nil
|
||||||
|
@ -269,7 +269,7 @@ func ConfigLoad(proxy *Proxy, svcFlag *string) error {
|
||||||
}
|
}
|
||||||
proxy.allWeeklyRanges = allWeeklyRanges
|
proxy.allWeeklyRanges = allWeeklyRanges
|
||||||
|
|
||||||
if testGracePeriod != nil && *testGracePeriod > 0 {
|
if testGracePeriod != nil && *testGracePeriod >= 0 {
|
||||||
proxy.testGracePeriod = testGracePeriod
|
proxy.testGracePeriod = testGracePeriod
|
||||||
proxy.listenAddresses = nil
|
proxy.listenAddresses = nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue