- Update to 0.1.13 - Modify all configuration paths from letsencrypt to acme - Update periodic script to reflect path changes - Update sample scripts to reflect path changes - Add warning to pkg-message for changed paths - Add UPDATING entry for changed paths - Remove warning for old periodic.conf variable names - Remove warning for letskencrypt rename
21 lines
669 B
Bash
21 lines
669 B
Bash
#!/bin/sh -e
|
|
|
|
BASEDIR="%%PREFIX%%/etc/acme"
|
|
SSLDIR="%%PREFIX%%/etc/ssl/acme"
|
|
DOMAINSFILE="${BASEDIR}/domains.txt"
|
|
CHALLENGEDIR="/usr/jails/http/usr/local/www/.well-known/acme-challenge"
|
|
|
|
[ ! -d "${SSLDIR}/private" ] && mkdir -pm700 "${SSLDIR}/private"
|
|
|
|
cat "${DOMAINSFILE}" | while read domain line ; do
|
|
CERTSDIR="${SSLDIR}/${domain}"
|
|
[ ! -d "${CERTSDIR}" ] && mkdir -pm755 "${CERTSDIR}"
|
|
set +e # RC=2 when time to expire > 30 days
|
|
acme-client -b -C "${CHALLENGEDIR}" \
|
|
-k "${SSLDIR}/private/${domain}.pem" \
|
|
-c "${CERTSDIR}" \
|
|
${domain} ${line}
|
|
RC=$?
|
|
set -e
|
|
[ $RC -ne 0 -a $RC -ne 2 ] && exit $RC
|
|
done
|