acme: fix account parsing

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2020-04-16 19:42:27 +02:00 committed by Thomas Lamprecht
parent 2fafc70666
commit a3a9f9e0ba
2 changed files with 4 additions and 4 deletions

View File

@ -223,7 +223,7 @@ __PACKAGE__->register_method ({
my $realcmd = sub {
STDOUT->autoflush(1);
my $account = $acme_node_config->{account} // 'default';
my $account = $acme_node_config->{account};
my $account_file = "${acme_account_dir}/${account}";
die "ACME account config file '$account' does not exist.\n"
if ! -e $account_file;
@ -297,7 +297,7 @@ __PACKAGE__->register_method ({
my $realcmd = sub {
STDOUT->autoflush(1);
my $account = $acme_node_config->{account} // 'default';
my $account = $acme_node_config->{account};
my $account_file = "${acme_account_dir}/${account}";
die "ACME account config file '$account' does not exist.\n"
if ! -e $account_file;
@ -361,7 +361,7 @@ __PACKAGE__->register_method ({
my $realcmd = sub {
STDOUT->autoflush(1);
my $account = $acme_node_config->{account} // 'default';
my $account = $acme_node_config->{account};
my $account_file = "${acme_account_dir}/${account}";
die "ACME account config file '$account' does not exist.\n"
if ! -e $account_file;

View File

@ -243,7 +243,7 @@ sub get_acme_conf {
die $@;
}
}
$res->{0}->{account} = $res->{0}->{account} // "default";
$res->{account} = delete $res->{0}->{account} // "default";
my $domainlist = [];
for my $index (0..$MAXDOMAINS) {