diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2020-12-09 21:47:54 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2020-12-09 22:07:18 +0100 |
commit | 0f574f73182491fe793fcdfce6632372fab4d5c3 (patch) | |
tree | 4256fdc08a06c714fb8c2e4005a254dda7b5afe0 /lacme | |
parent | 61e4ad1347f51a84400cbf87633cc99f657f9ad7 (diff) |
lacme: new flag `--force`.
Which aliases to `--min-days=-1`, i.e., forces renewal regardless of the
expiration date of existing certificates.
Diffstat (limited to 'lacme')
-rwxr-xr-x | lacme | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -63,7 +63,11 @@ sub usage(;$$) { } exit $rv; } -usage(1) unless GetOptions(\%OPTS, qw/config=s config-certs=s@ socket=s register tos-agreed deactivate min-days=i quiet|q debug help|h/); +usage(1) unless GetOptions(\%OPTS, qw/config=s config-certs=s@ socket=s + register tos-agreed deactivate + min-days=i force + quiet|q + debug help|h/); usage(0) if $OPTS{help}; $COMMAND = shift(@ARGV) // usage(1, "Missing command"); @@ -643,6 +647,7 @@ if ($COMMAND eq 'account') { # newOrder [SECTION ..] # elsif ($COMMAND eq 'newOrder' or $COMMAND eq 'new-cert') { + $OPTS{'min-days'} = -1 if $OPTS{force}; $COMMAND = 'newOrder'; my $conffiles = defined $OPTS{'config-certs'} ? $OPTS{'config-certs'} : defined $CONFIG->{_}->{'config-certs'} ? [ split(/\s+/, $CONFIG->{_}->{'config-certs'}) ] |