Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 28 lines (19 sloc) 731 Bytes
echo "Renewing the Let's Encrypt SSL cert..."
python /home/letsencrypt/ --account www/account.key \
--csr www/domain.csr --acme-dir /srv/www/challenges > www/signed.crt
echo "Getting Let's Encrypt cross-signed PEM file."
wget -O - \
> www/intermediate.pem
echo "Concatenating cross-signed PEM with our SSL certificate."
cat www/signed.crt www/intermediate.pem > www/chained.pem
echo "Testing configuration."
sudo /usr/sbin/nginx -t
if [ $? -gt 0 ]; then
echo "WARNING: Bad configuration detected."
exit 1
echo "Restarting Nginx so changes will take effect."
sudo /usr/sbin/service nginx restart
exit 0