Last active
January 29, 2019 00:51
-
-
Save mikebuss/81de9afb14c666ee4ddda51191fc8fbe to your computer and use it in GitHub Desktop.
certbot-renewal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Updating certbot..." | |
sudo apt-get update | |
sudo apt-get install software-properties-common | |
sudo add-apt-repository universe | |
sudo add-apt-repository ppa:certbot/certbot | |
sudo apt-get update | |
sudo apt-get install certbot python-certbot-apache | |
echo "Printing version..." | |
certbot --version | |
echo "If this is > 0.28, we are good." | |
sudo sh -c "sed -i.bak -e 's/^\(pref_challs.*\)tls-sni-01\(.*\)/\1http-01\2/g' /etc/letsencrypt/renewal/*; rm -f /etc/letsencrypt/renewal/*.bak" | |
echo "Doing a dry run..." | |
sudo certbot renew --dry-run --preferred-challenges http-01,dns-01 | |
echo "If this succeeded, run:" | |
echo "sudo certbot renew --preferred-challenges http-01,dns-01 --force-renewal && sudo service apache2 restart" | |
sudo service apache2 restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment