diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2016-12-01 00:37:52 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2016-12-01 00:37:52 +0100 |
commit | 844edd3dd60590bafcaa863eedb6cda94a0e07a3 (patch) | |
tree | 91c6d6953c685f52698bf67aa537090626edae54 | |
parent | aa514ea28e997765a40f5efdebbf24e9a6e83cef (diff) |
lacme: add an option --quiet to avoid mentioning valid certs.
-rwxr-xr-x | lacme | 5 | ||||
-rw-r--r-- | lacme.md | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -60,7 +60,7 @@ sub usage(;$$) { } exit $rv; } -usage(1) unless GetOptions(\%OPTS, qw/config=s config-certs=s socket=s agreement-uri=s debug help|h/); +usage(1) unless GetOptions(\%OPTS, qw/config=s config-certs=s socket=s agreement-uri=s quiet|q debug help|h/); usage(0) if $OPTS{help}; $COMMAND = shift(@ARGV) // usage(1, "Missing command"); @@ -120,6 +120,7 @@ do { die "Invalid section(s): ".join(', ', keys %$h)."\n" if %$h; $CONFIG->{_} = $defaults; delete $CONFIG->{accountd} unless $accountd; + $OPTS{quiet} = 0 if $OPTS{debug}; }; # Regular expressions for domain validation @@ -592,7 +593,7 @@ elsif ($COMMAND eq 'new-cert') { my $d = $conf->{'min-days'} // 10; if ($d > 0 and $t - time > $d*86400) { my $d = POSIX::strftime('%Y-%m-%d %H:%M:%S UTC', gmtime($t)); - print STDERR "[$s] Valid until $d, skipping\n"; + print STDERR "[$s] Valid until $d, skipping\n" unless $OPTS{quiet}; next; } } @@ -123,6 +123,10 @@ Generic options : Display a brief help and exit. +`-q`, `--quiet` + +: Be quiet. + `--debug` : Turn on debug mode. |