Checking certificates for onion only versions
This commit is contained in:
parent
62e891c141
commit
5db74ee7df
|
@ -190,7 +190,7 @@ function check_certificates {
|
|||
if [ "$2" ]; then
|
||||
USE_LETSENCRYPT="$2"
|
||||
fi
|
||||
if [[ $USE_LETSENCRYPT == 'no' ]]; then
|
||||
if [[ $USE_LETSENCRYPT == 'no' || "$ONION_ONLY" != 'no' ]]; then
|
||||
if [ ! -f "/etc/ssl/private/${1}.key" ]; then
|
||||
echo $"Private certificate for ${CHECK_HOSTNAME} was not created"
|
||||
exit 63959
|
||||
|
@ -239,12 +239,21 @@ function cert_exists {
|
|||
}
|
||||
|
||||
function create_self_signed_cert {
|
||||
if [ ! "${SITE_DOMAIN_NAME}" ]; then
|
||||
echo $'No site domain specified for self signed cert'
|
||||
exit 4638565385
|
||||
fi
|
||||
"${PROJECT_NAME}-addcert" -h "${SITE_DOMAIN_NAME}" --dhkey "${DH_KEYLENGTH}"
|
||||
function_check check_certificates
|
||||
check_certificates "${SITE_DOMAIN_NAME}"
|
||||
}
|
||||
|
||||
function create_letsencrypt_cert {
|
||||
if [ ! "${SITE_DOMAIN_NAME}" ]; then
|
||||
echo $'No site domain specified for letsencrypt cert'
|
||||
exit 246824624
|
||||
fi
|
||||
|
||||
if ! "${PROJECT_NAME}-addcert" -e "${SITE_DOMAIN_NAME}" -s "${LETSENCRYPT_SERVER}" --dhkey "${DH_KEYLENGTH}" --email "${MY_EMAIL_ADDRESS}"; then
|
||||
if [[ ${NO_SELF_SIGNED} == 'no' ]]; then
|
||||
echo $"Lets Encrypt failed for ${SITE_DOMAIN_NAME}, so try making a self-signed cert"
|
||||
|
|
Loading…
Reference in New Issue