aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2019-09-11 16:15:59 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2019-09-11 16:15:59 +0300
commitd62fd8fbc9c272e79a58c30e964702c52d1f56c9 (patch)
tree232aea53ded25cfdb286369bc83c29e840fcf948
parentda90b094e7973bc4b7dedcd5cad086dc1d7a8fee (diff)
downloadacmeman-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--Changes3
-rw-r--r--lib/App/Acmeman.pm2
-rw-r--r--lib/App/Acmeman/Source.pm7
-rw-r--r--lib/App/Acmeman/Source/Apache.pm2
4 files changed, 12 insertions, 2 deletions
diff --git a/Changes b/Changes
index dcf480c..2f7efbd 100644
--- a/Changes
+++ b/Changes
@@ -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}) {

Return to:

Send suggestions and report system problems to the System administrator.