diff options
-rwxr-xr-x | acmeman | 9 | ||||
-rw-r--r-- | lib/App/Acmeman/Config.pm | 8 |
2 files changed, 11 insertions, 6 deletions
@@ -1,7 +1,7 @@ #!/bin/sh -#!-*-perl-*- -eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' - if 0; # not running under some shell +#! -*-perl-*- +eval 'exec perl -x -wS $0 ${1+"$@"}' + if 0; # Copyright (C) 2017, 2018 Sergey Poznyakoff <gray@gnu.org> # # This program is free software; you can redistribute it and/or modify @@ -563,7 +563,7 @@ Sergey Poznyakoff <gray@gnu.org> my $progname = basename($0); my $progdescr = "manages ACME certificates"; -my $debug; +my $debug = 0; my $dry_run; my $acme_host = 'prod'; my %acme_endpoint = (prod => 'acme-v01.api.letsencrypt.org', @@ -1182,6 +1182,7 @@ if ($config->success) { if ($check_alt_names) { $config->set(qw(core check-alt-names), $check_alt_names); } + $config->finalize; } unless ($config->success) { diff --git a/lib/App/Acmeman/Config.pm b/lib/App/Acmeman/Config.pm index bbe1f2b..614a46a 100644 --- a/lib/App/Acmeman/Config.pm +++ b/lib/App/Acmeman/Config.pm @@ -30,11 +30,15 @@ sub new { } else { $self->error("configuration file \"$filename\" does not exist"); } - + $self->finalize; + return $self; +} + +sub finalize { + my $self = shift; if ($self->success && exists($self->{_syntax})) { $self->_fixup($self->{_syntax}, $self->{_conf}); } - return $self; } sub error { |