[root@ait ~]# cd bin/letsencrypt/letsencrypt-master
[root@ait letsencrypt-master]# /etc/init.d/httpd stop
[root@ait letsencrypt-master]# ./letsencrypt-auto certonly -tvv --standalone --keep -d ait.csie.cyut.edu.tw
[root@ait letsencrypt-master]# /etc/init.d/httpd start
[root@ait letsencrypt-master]# vim letsencrypt-renew.sh [root@ait letsencrypt-master]# cat letsencrypt-renew.sh #!/bin/bash [ -z "$1" ] && dom='ait.csie.cyut.edu.tw' || dom="$1" dir=/root/bin/letsencrypt/letsencrypt-master /etc/init.d/httpd stop if ! $dir/letsencrypt-auto certonly -tvv --standalone --keep -d $dom > /var/log/letsencrypt/renew.log 2>&1 ; then echo Automated renewal failed: #cat /var/log/letsencrypt/renew.log exit 1 fi [root@ait letsencrypt-master]# chmod 700 letsencrypt-renew.sh
[root@ait letsencrypt-master]# crontab -e [root@ait letsencrypt-master]# crontab -l 39 4 20 1,3,5,7,9,11 * /root/bin/letsencrypt/letsencrypt-master/letsencrypt-renew.sh ait.csie.cyut.edu.tw