Index: Makefile =================================================================== --- Makefile (revision 446719) +++ Makefile (working copy) @@ -3,6 +3,7 @@ PORTNAME= certbot PORTVERSION= 0.16.0 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= security python MASTER_SITES= CHEESESHOP @@ -14,7 +15,7 @@ LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE.txt -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}acme==${PKGVERSION}:security/py-acme \ +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}acme>0:security/py-acme \ ${PYTHON_PKGNAMEPREFIX}configargparse>=0.9.3:devel/py-configargparse \ ${PYTHON_PKGNAMEPREFIX}configobj>0:devel/py-configobj \ ${PYTHON_PKGNAMEPREFIX}cryptography>=1.2:security/py-cryptography \ @@ -28,16 +29,24 @@ ${PYTHON_PKGNAMEPREFIX}zope.interface>0:devel/py-zope.interface TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock -USES= python:-2.7 +USES= python USE_PYTHON= autoplist distutils NO_ARCH= yes +SUB_FILES= 000.certbot.sh +PLIST_FILES= etc/periodic/weekly/000.certbot.sh + post-patch: - ${REINPLACE_CMD} \ + @${REINPLACE_CMD} \ -e 's|/etc/|${LOCALBASE}/etc/|' \ -e 's|/var/lib|/var/db|' \ ${WRKSRC}/${PORTNAME}/constants.py + +post-install: + @${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/weekly + ${INSTALL_SCRIPT} ${WRKDIR}/000.certbot.sh ${STAGEDIR}${PREFIX}/etc/periodic/weekly + do-test: @cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test Index: files/000.certbot.sh.in =================================================================== --- files/000.certbot.sh.in (nonexistent) +++ files/000.certbot.sh.in (working copy) @@ -0,0 +1,21 @@ +#!/bin/sh + +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +PATH=$PATH:%%LOCALBASE%%/bin:%%LOCALBASE%%/sbin +export PATH + +case "$weekly_certbot_enable" in +[Yy][Ee][Ss]) + echo + echo "Updating Let's Encrypt certificates:" + + %%PREFIX%%/bin/certbot renew + ;; +*) + ;; +esac Property changes on: files/000.certbot.sh.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: pkg-message =================================================================== --- pkg-message (revision 446719) +++ pkg-message (working copy) @@ -18,4 +18,9 @@ * Apache plugin: security/py-certbot-apache * Nginx plugin: security/py-certbot-nginx +In order to run the script regularly to update the certificates add this +line to /etc/periodic.conf: + + weekly_certbot_enable="YES" + ===========================================================================