command_sign_csr: redirect fds after init_system (fixes #816)

This commit is contained in:
Lukas Schauer
2021-04-16 14:32:05 +02:00
parent 5c1551e946
commit fb06530097

View File

@@ -1760,12 +1760,12 @@ command_sign_domains() {
# Usage: --signcsr (-s) path/to/csr.pem
# Description: Sign a given CSR, output CRT on stdout (advanced usage)
command_sign_csr() {
init_system
# redirect stdout to stderr
# leave stdout over at fd 3 to output the cert
exec 3>&1 1>&2
init_system
# load csr
csrfile="${1}"
if [ ! -r "${csrfile}" ]; then