Index: security/letsencrypt.sh/Makefile =================================================================== --- security/letsencrypt.sh/Makefile +++ security/letsencrypt.sh/Makefile @@ -1,40 +1,54 @@ # $FreeBSD$ PORTNAME= letsencrypt.sh -PORTVERSION= 0.0.0.20160116 +PORTVERSION= 0.0.0.20160212 CATEGORIES= security MAINTAINER= sascha@root-login.org -COMMENT= Pure BASH Lets Encrypt client +COMMENT= Pure BASH/ZSH Lets Encrypt client LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE -RUN_DEPENDS= bash:${PORTSDIR}/shells/bash \ - curl:${PORTSDIR}/ftp/curl +RUN_DEPENDS= curl:${PORTSDIR}/ftp/curl USE_GITHUB= yes GH_ACCOUNT= lukas2511 -GH_TAGNAME= 23b0ef5 +GH_TAGNAME= f7c079c + +OPTIONS_SINGLE= SHELL +OPTIONS_SINGLE_SHELL= BASH ZSH +BASH_DESC= Use the Bourne Again shell (BASH) +ZSH_DESC= Use the Z shell (ZSH) + +OPTIONS_DEFAULT= BASH NO_ARCH= yes NO_BUILD= yes USES= shebangfix -PERIODIC_DIRS= etc/periodic/monthly +BASH_RUN_DEPENDS= bash:${PORTSDIR}/shells/bash +ZSH_RUN_DEPENDS= zsh:${PORTSDIR}/shells/zsh + +PERIODIC_DIRS= etc/periodic/weekly PERIODIC_FILES= 000.letsencrypt.sh PLIST_DIRS= %%ETCDIR%%/.acme-challenges PLIST_FILES= bin/letsencrypt.sh \ %%ETCDIR%%/config.sh.example \ %%ETCDIR%%/domains.txt.example \ - etc/periodic/monthly/000.letsencrypt.sh + ${PERIODIC_DIRS}/000.letsencrypt.sh SUB_FILES= 000.letsencrypt.sh pkg-message SUB_LIST= PORTNAME=${PORTNAME} SHEBANG_FILES= config.sh.example +post-patch-ZSH: +. for p in config.sh.example letsencrypt.sh + ${REINPLACE_CMD} '1 s/bash/zsh/' ${WRKSRC}/${p} +. endfor + do-install: @${MKDIR} ${STAGEDIR}${ETCDIR}/.acme-challenges ${STAGEDIR}${PREFIX}/${PERIODIC_DIRS} ${INSTALL_DATA} ${WRKSRC}/config.sh.example ${STAGEDIR}${ETCDIR}/config.sh.example Index: security/letsencrypt.sh/distinfo =================================================================== --- security/letsencrypt.sh/distinfo +++ security/letsencrypt.sh/distinfo @@ -1,2 +1,2 @@ -SHA256 (lukas2511-letsencrypt.sh-0.0.0.20160116-23b0ef5_GH0.tar.gz) = bac41812abec6ff36e13b72bf8c84de20a7e3d5568a0fdae848a693c08973683 -SIZE (lukas2511-letsencrypt.sh-0.0.0.20160116-23b0ef5_GH0.tar.gz) = 12190 +SHA256 (lukas2511-letsencrypt.sh-0.0.0.20160212-f7c079c_GH0.tar.gz) = 6cd11b961779716b68cf238ff729b7ef03074fb529d2004cccad9b0748592e9c +SIZE (lukas2511-letsencrypt.sh-0.0.0.20160212-f7c079c_GH0.tar.gz) = 15216 Index: security/letsencrypt.sh/files/000.letsencrypt.sh.in =================================================================== --- security/letsencrypt.sh/files/000.letsencrypt.sh.in +++ security/letsencrypt.sh/files/000.letsencrypt.sh.in @@ -8,9 +8,17 @@ source_periodic_confs fi -case "$monthly_letsencrypt_enable" in +case "$weekly_letsencrypt_enable" in [Yy][Ee][Ss]) - %%PREFIX%%/bin/letsencrypt.sh -c + if [ -z "$weekly_letsencrypt_user" ] + then + %%PREFIX%%/bin/letsencrypt.sh -c + else + su -m $weekly_letsencrypt_user -c '%%PREFIX%%/bin/letsencrypt.sh -c' + fi + if [ -x "$weekly_letsencrypt_deployscript" ] + $weekly_letsencrypt_deployscript + fi ;; *) ;;