Skip to content

Commit

Permalink
Merge 'TinCanTech-master' - Add 'init' to install_data_to_pki()
Browse files Browse the repository at this point in the history
This will create EASYRSA_PKI/vars from example for all new PKIs.

Signed-off-by: Richard T Bonhomme <[email protected]>
  • Loading branch information
TinCanTech committed Mar 29, 2022
2 parents 90b10c3 + a6db7f4 commit 606cc48
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion easyrsa3/easyrsa
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ and initialize a fresh PKI here."
done

# Install data-files into ALL new PKIs
install_data_to_pki || \
install_data_to_pki init || \
warn "Failed to install required data-files to PKI. (init)"

# Verify that $EASYRSA_SAFE_CONF exists ($OPENSSL_CONF)
Expand Down Expand Up @@ -667,6 +667,11 @@ install_data_to_pki () {
fi
done

# If this is init-pki then create PKI/vars from example
if [ -n "$1" ] && [ -e "${EASYRSA_PKI}/${vars_file_example}" ]; then
cp -f "${EASYRSA_PKI}/${vars_file_example}" "${EASYRSA_PKI}/${vars_file}"
fi

# Check PKI is updated - Omit 'vars' and example.
#[ -e "${EASYRSA_PKI}/${vars_file}" ] || return
#[ -e "${EASYRSA_PKI}/${vars_file_example}" ] || return
Expand Down

0 comments on commit 606cc48

Please sign in to comment.