aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
Diffstat (limited to 'security')
-rw-r--r--security/letsencrypt.sh/Makefile32
-rw-r--r--security/letsencrypt.sh/distinfo4
-rw-r--r--security/letsencrypt.sh/files/000.letsencrypt.sh.in12
-rw-r--r--security/letsencrypt.sh/files/pkg-message.in10
4 files changed, 45 insertions, 13 deletions
diff --git a/security/letsencrypt.sh/Makefile b/security/letsencrypt.sh/Makefile
index 989a00b1cc7f..d0d43581c3f0 100644
--- a/security/letsencrypt.sh/Makefile
+++ b/security/letsencrypt.sh/Makefile
@@ -1,43 +1,59 @@
# $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%%/hook.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
+SHEBANG_FILES= config.sh.example hook.sh.example letsencrypt.sh
+
+post-patch-ZSH-on:
+. for p in config.sh.example hook.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
+ ${INSTALL_DATA} ${WRKSRC}/hook.sh.example ${STAGEDIR}${ETCDIR}/hook.sh.example
${INSTALL_DATA} ${WRKSRC}/domains.txt.example ${STAGEDIR}${ETCDIR}/domains.txt.example
${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
${INSTALL_SCRIPT} ${WRKDIR}/${PERIODIC_FILES} ${STAGEDIR}${PREFIX}/${PERIODIC_DIRS}/${PERIODIC_FILES}
diff --git a/security/letsencrypt.sh/distinfo b/security/letsencrypt.sh/distinfo
index faf080ad0fa8..4f3030c6c93d 100644
--- a/security/letsencrypt.sh/distinfo
+++ b/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
diff --git a/security/letsencrypt.sh/files/000.letsencrypt.sh.in b/security/letsencrypt.sh/files/000.letsencrypt.sh.in
index 25891b4672be..d30e980c00e0 100644
--- a/security/letsencrypt.sh/files/000.letsencrypt.sh.in
+++ b/security/letsencrypt.sh/files/000.letsencrypt.sh.in
@@ -8,9 +8,17 @@ then
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
;;
*)
;;
diff --git a/security/letsencrypt.sh/files/pkg-message.in b/security/letsencrypt.sh/files/pkg-message.in
index 8defa9ed8367..f14cdcaadfc7 100644
--- a/security/letsencrypt.sh/files/pkg-message.in
+++ b/security/letsencrypt.sh/files/pkg-message.in
@@ -10,5 +10,13 @@ it missing.
In order to run the script regularly to update
the certificates add this line to /etc/periodic.conf
-monthly_letsencrypt_enable="YES"
+weekly_letsencrypt_enable="YES"
+
+Additionally the following parameters can be added to
+/etc/periodic.conf
+
+To run the certification renenewal as a different user
+weekly_letsencrypt_user="_letsencrypt"
+To run a script after the renewal (as root)
+weekly_letsencrypt_deployscript="%%PREFIX%%/etc/%%PORTNAME%%/deploy.sh"