



















Oh, the pvenode commands are also valid for PMG? I didn't expect that. I thought they're only for PVE Nodes.
Thank for your reply.
I have a last question about the parameters the pmgconfig expects here:
Code:
pmgconfig cert set <type> <certificates> <key> [OPTIONS] [FORMAT_OPTIONS]
Upload or update custom certificate chain and key.
<type>: <api | smtp>
The TLS certificate type (API or SMTP certificate).
<certificates>: <string>
PEM encoded certificate (chain).
<key>: <string>
PEM encoded private key.
--force <boolean> (default =0)
Overwrite existing custom or ACME certificate files.
--restart <boolean> (default =0)
Restart services.
Does this really mean to pass the whole cert and key as strings here? Or is a filepath expected instead?
Pasting multi-line strings via commands is always a hassle from scripts IMHO.
Thank you.
Yes, the raw certificate/key as strings are expected since pmgconfig mostly just wraps the API a bit more neatly for command-line usage.
But if you already got the files somewhere, you can invoke it e.g. as
Bash:
pmgconfig cert set api "$(cat /var/lib/certs/cert.pem)" "$(cat /var/lib/certs/key.pem)"
Being able to pass filepaths instead seems like a pretty reasonable thing to have for CLIs, though - feel free to create a feature request over at https://bugzilla.proxmox.com/ ![]()
Hm, the syntax with "$(cat ..." does not work:
Unknown option: ---begin private key-----
(...)
<content of file is shown here>
(....)
400 unable to parse option
pmgconfig cert set <type> <certificates> <key> [OPTIONS] [FORMAT_OPTIONS]
Oh, I found out that it already expects file-pathes for the cert and the key! So the docu and the inbuilt help texts are just wrong.
I will update the bugreport
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。