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,3 +1,6 @@
+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.
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
@@ -25,7 +25,7 @@ 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";
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
@@ -25,6 +25,13 @@ sub get {
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";
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
@@ -32,7 +32,7 @@ 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);
}

Return to:

Send suggestions and report system problems to the System administrator.