Fixes for Certain Lets Encrypt Certbot Issues

This commit is contained in:
earnolmartin 2021-02-26 15:58:25 -07:00
parent 680df73a6a
commit 2eded1cbbd
2 changed files with 28 additions and 0 deletions

View file

@ -2859,6 +2859,20 @@ function installCertBotLetsEncrypt(){
/usr/local/bin/certbot --quiet
cd "$curDir"
addSystemCronJob "45 4 * * *" "/var/www/new/ehcp/scripts/certbot_renew_certs.sh"
# Check for common errors
capturedCertbotOutput=$(/usr/local/bin/certbot 2>&1)
frozensetIssue=$(echo "$capturedCertbotOutput" | grep -o "'frozenset' object is not callable")
if [ ! -z "$frozensetIssue" ]; then
echo "Running hashlib fix!"
rm -rf /usr/lib/python2.7/dist-packages/chardet*.egg-info
rm -rf /usr/lib/python2.7/dist-packages/chardet
rm /usr/lib/python2.7/lib-dynload/_hashlib.x86_64-linux-gnu.so
rm /usr/lib/python2.7/lib-dynload/_hashlib.i386-linux-gnu.so
pip install requests
pip install chardet
easy_install hashlib
fi
}
function adjustOperationMode(){

View file

@ -2500,6 +2500,20 @@ function installCertBotLetsEncrypt(){
/usr/local/bin/certbot --quiet
cd "$curDir"
addSystemCronJob "45 4 * * *" "/var/www/new/ehcp/scripts/certbot_renew_certs.sh"
# Check for common errors
capturedCertbotOutput=$(/usr/local/bin/certbot 2>&1)
frozensetIssue=$(echo "$capturedCertbotOutput" | grep -o "'frozenset' object is not callable")
if [ ! -z "$frozensetIssue" ]; then
echo "Running hashlib fix!"
rm -rf /usr/lib/python2.7/dist-packages/chardet*.egg-info
rm -rf /usr/lib/python2.7/dist-packages/chardet
rm /usr/lib/python2.7/lib-dynload/_hashlib.x86_64-linux-gnu.so
rm /usr/lib/python2.7/lib-dynload/_hashlib.i386-linux-gnu.so
pip install requests
pip install chardet
easy_install hashlib
fi
}
function searchForServiceName(){