diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2019-09-11 14:37:23 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2019-09-11 14:41:48 +0300 |
commit | da90b094e7973bc4b7dedcd5cad086dc1d7a8fee (patch) | |
tree | f19efa8c78e2c4a0ee6cf6e37d1a55f24c7919bf | |
parent | adf16c29939378f3eaa716239da53bb7e3ef6283 (diff) | |
download | acmeman-da90b094e7973bc4b7dedcd5cad086dc1d7a8fee.tar.gz acmeman-da90b094e7973bc4b7dedcd5cad086dc1d7a8fee.tar.bz2 |
Bugfixes.v2.01
* Changes: Update
* Makefile.PL: Require Config::Parser.
* lib/App/Acmeman.pm: Implement the --version option.
* lib/App/Acmeman/Source/Apache.pm (scan): Set core.postrenew
from layout, if it is not set explicitly.
* lib/App/Acmeman/Source/File.pm (scan): Fix inverted logic (load
returns false on error.
-rw-r--r-- | Changes | 4 | ||||
-rw-r--r-- | Makefile.PL | 3 | ||||
-rw-r--r-- | lib/App/Acmeman.pm | 44 | ||||
-rw-r--r-- | lib/App/Acmeman/Source/Apache.pm | 3 | ||||
-rw-r--r-- | lib/App/Acmeman/Source/File.pm | 4 |
5 files changed, 35 insertions, 23 deletions
@@ -1 +1,5 @@ +2.01 2019-09-11 + - Fix the "file" source (inverted logic was assumed) + - Implement the --version option. + 2.00 2019-08-26 diff --git a/Makefile.PL b/Makefile.PL index 0d093a8..f7195d4 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -35,3 +35,4 @@ my %makefile_args = ( 'Apache::Defaults' => 1.02, - 'Apache::Config::Preproc' => 1.03 + 'Apache::Config::Preproc' => 1.03, + 'Config::Parser' => 1.03 }, diff --git a/lib/App/Acmeman.pm b/lib/App/Acmeman.pm index 8f253b2..99d018a 100644 --- a/lib/App/Acmeman.pm +++ b/lib/App/Acmeman.pm @@ -18,3 +18,3 @@ use Pod::Usage; use Pod::Man; -use Getopt::Long qw(:config gnu_getopt no_ignore_case auto_version); +use Getopt::Long qw(:config gnu_getopt no_ignore_case); use POSIX qw(strftime time floor); @@ -27,3 +27,3 @@ use feature 'state'; -our $VERSION = '2.00'; +our $VERSION = '2.01'; @@ -48,20 +48,24 @@ sub new { GetOptions( - "h" => sub { - pod2usage(-message => "$self->{_progname}: $progdescr", - -exitstatus => EX_OK); - }, - "help" => sub { - pod2usage(-exitstatus => EX_OK, -verbose => 2); - }, - "usage" => sub { - pod2usage(-exitstatus => EX_OK, -verbose => 0); - }, - "debug|d+" => \$self->{_option}{debug}, - "dry-run|n" => \$self->{_option}{dry_run}, - "stage|s" => sub { $self->{_acme_host} = 'staging' }, - "force|F" => \$self->{_option}{force}, - "time-delta|D=n" => \$self->{_option}{time_delta}, - "setup|S" => sub { $self->{_command} = 'setup' }, - "alt-names|a" => \$self->{_option}{check_alt_names}, - "config-file|f=s" => \$self->{_option}{config_file}, + 'h' => sub { + pod2usage(-message => "$self->{_progname}: $progdescr", + -exitstatus => EX_OK); + }, + 'help' => sub { + pod2usage(-exitstatus => EX_OK, -verbose => 2); + }, + 'usage' => sub { + pod2usage(-exitstatus => EX_OK, -verbose => 0); + }, + 'debug|d+' => \$self->{_option}{debug}, + 'dry-run|n' => \$self->{_option}{dry_run}, + 'stage|s' => sub { $self->{_acme_host} = 'staging' }, + 'force|F' => \$self->{_option}{force}, + 'time-delta|D=n' => \$self->{_option}{time_delta}, + 'setup|S' => sub { $self->{_command} = 'setup' }, + 'alt-names|a' => \$self->{_option}{check_alt_names}, + 'config-file|f=s' => \$self->{_option}{config_file}, + 'version' => sub { + print "$0 version $VERSION\n"; + exit(EX_OK) + } ) or exit(EX_USAGE); diff --git a/lib/App/Acmeman/Source/Apache.pm b/lib/App/Acmeman/Source/Apache.pm index 042956a..ae9c342 100644 --- a/lib/App/Acmeman/Source/Apache.pm +++ b/lib/App/Acmeman/Source/Apache.pm @@ -33,3 +33,4 @@ sub scan { debug(2, 'assuming Apache layout "'.$self->layout->name.'"'); - $self->set(qw(core postrenew), $self->layout->restart_command); + $self->set(qw(core postrenew), $self->layout->restart_command) + unless $self->cfg->is_set(qw(core postrenew)); return $self->examine_http_config($self->layout->config_file); diff --git a/lib/App/Acmeman/Source/File.pm b/lib/App/Acmeman/Source/File.pm index c622d51..aa678fd 100644 --- a/lib/App/Acmeman/Source/File.pm +++ b/lib/App/Acmeman/Source/File.pm @@ -38,3 +38,5 @@ sub scan { next if $file =~ m{$self->{ignore}}; - $err |= $self->load($file); + unless ($self->load($file)) { + ++$err; + } } |