Fall back to a self-signed cert if lets encrypt doesn't register

This commit is contained in:
Bob Mottram 2016-03-31 10:56:21 +01:00
parent dc599fb2b9
commit 027a1ec0bf
1 changed files with 4 additions and 0 deletions

View File

@ -9826,6 +9826,10 @@ function install_mediagoblin {
${PROJECT_NAME}-addcert -h $MEDIAGOBLIN_DOMAIN_NAME --dhkey $DH_KEYLENGTH ${PROJECT_NAME}-addcert -h $MEDIAGOBLIN_DOMAIN_NAME --dhkey $DH_KEYLENGTH
else else
${PROJECT_NAME}-addcert -e $MEDIAGOBLIN_DOMAIN_NAME -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH --email $MY_EMAIL_ADDRESS ${PROJECT_NAME}-addcert -e $MEDIAGOBLIN_DOMAIN_NAME -s $LETSENCRYPT_SERVER --dhkey $DH_KEYLENGTH --email $MY_EMAIL_ADDRESS
if [ ! "$?" = "0" ]; then
echo $'Lets Encrypt failed for this domain, so try making a self-signed cert'
${PROJECT_NAME}-addcert -h $MEDIAGOBLIN_DOMAIN_NAME --dhkey $DH_KEYLENGTH
fi
fi fi
check_certificates $MEDIAGOBLIN_DOMAIN_NAME check_certificates $MEDIAGOBLIN_DOMAIN_NAME
fi fi