Allow -test 0

This commit is contained in:
Frank Denis 2018-02-27 03:04:44 +01:00
parent 982f341de8
commit 1e2c175e19

View File

@ -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")
jsonOutput := flag.Bool("json", false, "output list as JSON")
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()
if *svcFlag == "stop" || *svcFlag == "uninstall" {
return nil
@ -269,7 +269,7 @@ func ConfigLoad(proxy *Proxy, svcFlag *string) error {
}
proxy.allWeeklyRanges = allWeeklyRanges
if testGracePeriod != nil && *testGracePeriod > 0 {
if testGracePeriod != nil && *testGracePeriod >= 0 {
proxy.testGracePeriod = testGracePeriod
proxy.listenAddresses = nil
}