#!/bin/sh /root/bin/letsencrypt renew --agree-tos > /var/log/letsencrypt/renew.log 2>&1 res=$? if [ $res -ne 0 ]; then echo Automated renewal failed: cat /var/log/letsencrypt/renew.log exit $res fi service apache2 reload