diff options
| -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. | 
