diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2019-09-11 16:15:59 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2019-09-11 16:15:59 +0300 |
commit | d62fd8fbc9c272e79a58c30e964702c52d1f56c9 (patch) | |
tree | 232aea53ded25cfdb286369bc83c29e840fcf948 | |
parent | da90b094e7973bc4b7dedcd5cad086dc1d7a8fee (diff) | |
download | acmeman-d62fd8fbc9c272e79a58c30e964702c52d1f56c9.tar.gz acmeman-d62fd8fbc9c272e79a58c30e964702c52d1f56c9.tar.bz2 |
Fix bug introduced in the previous commitv2.02
* Changes: Update.
* lib/App/Acmeman.pm: Version 2.02
* lib/App/Acmeman/Source.pm (is_set): New method.
* lib/App/Acmeman/Source/Apache.pm (scan): Use is_set method
instead of non-existing cfg.
-rw-r--r-- | Changes | 3 | ||||
-rw-r--r-- | lib/App/Acmeman.pm | 2 | ||||
-rw-r--r-- | lib/App/Acmeman/Source.pm | 7 | ||||
-rw-r--r-- | lib/App/Acmeman/Source/Apache.pm | 2 |
4 files changed, 12 insertions, 2 deletions
@@ -1,6 +1,9 @@ +2.02 2019-09-11 + - Fix the "apache" source + 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/lib/App/Acmeman.pm b/lib/App/Acmeman.pm index 99d018a..ad5899a 100644 --- a/lib/App/Acmeman.pm +++ b/lib/App/Acmeman.pm @@ -22,13 +22,13 @@ use App::Acmeman::Config; use App::Acmeman::Domain qw(:files); use Data::Dumper; use Text::ParseWords; use App::Acmeman::Log qw(:all :sysexits); use feature 'state'; -our $VERSION = '2.01'; +our $VERSION = '2.02'; my $progdescr = "manages ACME certificates"; my %acme_endpoint = (prod => 'acme-v01.api.letsencrypt.org', staging => 'acme-staging.api.letsencrypt.org'); my $letsencrypt_root_cert_url = diff --git a/lib/App/Acmeman/Source.pm b/lib/App/Acmeman/Source.pm index de1a666..abae342 100644 --- a/lib/App/Acmeman/Source.pm +++ b/lib/App/Acmeman/Source.pm @@ -22,12 +22,19 @@ sub get { my $self = shift; croak "improper use of the get method" unless exists $self->{_cfg}; return $self->{_cfg}->get(@_); } +sub is_set { + my $self = shift; + croak "improper use of the get method" + unless exists $self->{_cfg}; + return $self->{_cfg}->is_set(@_); +} + sub define_domain { my $self = shift; my $cn = shift || croak "domain name must be given"; $self->set('domain', $cn, 'files', 'default'); } diff --git a/lib/App/Acmeman/Source/Apache.pm b/lib/App/Acmeman/Source/Apache.pm index ae9c342..77d7e23 100644 --- a/lib/App/Acmeman/Source/Apache.pm +++ b/lib/App/Acmeman/Source/Apache.pm @@ -29,13 +29,13 @@ sub new { sub layout { shift->{_layout} } sub scan { my ($self) = @_; debug(2, 'assuming Apache layout "'.$self->layout->name.'"'); $self->set(qw(core postrenew), $self->layout->restart_command) - unless $self->cfg->is_set(qw(core postrenew)); + unless $self->is_set(qw(core postrenew)); return $self->examine_http_config($self->layout->config_file); } sub dequote { my ($self, $arg) = @_; if (defined($arg) && $arg =~ s{^"(.*?)"$}{$1}) { |