From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-api 2/4] acme: recursively create account directory
Date: Thu, 18 Mar 2021 16:14:47 +0100 [thread overview]
Message-ID: <20210318151449.18638-3-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20210318151449.18638-1-s.ivanov@proxmox.com>
to account for the new layout
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
src/PMG/API2/ACME.pm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/PMG/API2/ACME.pm b/src/PMG/API2/ACME.pm
index 1b35511..7aee17a 100644
--- a/src/PMG/API2/ACME.pm
+++ b/src/PMG/API2/ACME.pm
@@ -3,6 +3,8 @@ package PMG::API2::ACME;
use strict;
use warnings;
+use File::Path;
+
use PVE::Exception qw(raise_param_exc);
use PVE::JSONSchema qw(get_standard_option);
use PVE::Tools qw(extract_param);
@@ -142,7 +144,7 @@ __PACKAGE__->register_method ({
my $authuser = $rpcenv->get_user();
my ($account_name, $account_file) = extract_account_name($param);
- mkdir $acme_account_dir if ! -e $acme_account_dir;
+ File::Path::make_path($acme_account_dir) if ! -e $acme_account_dir;
raise_param_exc({'name' => "ACME account config file '${account_name}' already exists."})
if -e $account_file;
--
2.20.1
next prev parent reply other threads:[~2021-03-18 15:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-18 15:14 [pmg-devel] [PATCH pmg-api 0/4] cosmetic and minor improvements to certificate integration Stoiko Ivanov
2021-03-18 15:14 ` [pmg-devel] [PATCH pmg-api 1/4] package: ship /etc/pmg/acme/accounts in deb Stoiko Ivanov
2021-03-18 15:14 ` Stoiko Ivanov [this message]
2021-03-18 15:14 ` [pmg-devel] [PATCH pmg-api 3/4] cluster: use old and new fingerprint on master Stoiko Ivanov
2021-03-18 15:14 ` [pmg-devel] [PATCH pmg-api 4/4] certs: reload postfix to activate new certificate Stoiko Ivanov
2021-03-18 16:04 ` [pmg-devel] applied: [PATCH pmg-api 0/4] cosmetic and minor improvements to certificate integration Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210318151449.18638-3-s.ivanov@proxmox.com \
--to=s.ivanov@proxmox.com \
--cc=pmg-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.