Index: security/acme.sh/Makefile =================================================================== --- /dev/null +++ security/acme.sh/Makefile @@ -0,0 +1,38 @@ +# $FreeBSD$ + +PORTNAME= acme.sh +PORTVERSION= 2.6.6 +CATEGORIES= security + +MAINTAINER= jrm@FreeBSD.org +COMMENT= ACME protocol client written in shell + +LICENSE= GPLv3+ + +RUN_DEPENDS= curl:ftp/curl + +USE_GITHUB= yes +GH_ACCOUNT= Neilpang + +OPTIONS_DEFINE= CURL DOCS WGET +OPTIONS_DEFAULT= CURL +CURL_DESC= Add ftp/curl as a run-time dependency +WGET_DESC= Add ftp/wget as a run-time dependency + +NO_ARCH= yes +NO_BUILD= yes + +CURL_RUN_DEPENDS= curl:ftp/curl +WGET_RUN_DEPENDS= wget:ftp/wget + +PLIST_FILES= sbin/${PORTNAME} +PORTDOCS= README.md + +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin/${PORTNAME} + +do-install-DOCS-on: + ${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_MAN} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} + +.include Index: security/acme.sh/distinfo =================================================================== --- /dev/null +++ security/acme.sh/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1491576785 +SHA256 (Neilpang-acme.sh-2.6.6_GH0.tar.gz) = 6a420394ae4b2acbab4d2a522dcdca340dfa9d28ad1fb421f21b5e075ce1d817 +SIZE (Neilpang-acme.sh-2.6.6_GH0.tar.gz) = 54955 Index: security/acme.sh/files/000.dehydrated.in =================================================================== --- /dev/null +++ security/acme.sh/files/000.dehydrated.in @@ -0,0 +1,53 @@ +#!/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_letsencrypt_enable" in + [Yy][Ee][Ss]) + echo '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' + echo '!! WARNING: letsencrypt.sh has been renamed to dehydrated !!' + echo '!! rename all weekly_letsencrypt_* periodic variables !!' + echo '!! to weekly_dehydrated_* in your periodic.conf !!' + echo '|| and mv /usr/local/etc/{letsencrypt.sh,dehydrated} ||' + echo '|| default challenge path has been renamed as well ||' + echo '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' + : ${weekly_dehydrated_enable:=$weekly_letsencrypt_enable} + : ${weekly_dehydrated_user:=$weekly_letsencrypt_user} + : ${weekly_dehydrated_flags:=$weekly_letsencrypt_flags} + : ${weekly_dehydrated_deployscript:=$weekly_letsencrypt_deployscript} + ;; + *) + ;; +esac + +case "$weekly_dehydrated_enable" in + [Yy][Ee][Ss]) + echo + echo "Checking Let's Encrypt certificate status:" + + if [ -z "$weekly_dehydrated_user" ] + then + %%PREFIX%%/bin/dehydrated -c $weekly_dehydrated_flags + else + su -m "$weekly_dehydrated_user" -c "%%PREFIX%%/bin/dehydrated -c $weekly_dehydrated_flags" + fi + + echo "Deploying Let's Encrypt certificates:" + + if [ -x "$weekly_dehydrated_deployscript" ] + then + $weekly_dehydrated_deployscript + else + echo 'Skipped, deploy script not set or not executable.' + fi + ;; + *) + ;; +esac Index: security/acme.sh/files/pkg-message.in =================================================================== --- /dev/null +++ security/acme.sh/files/pkg-message.in @@ -0,0 +1,21 @@ +To use this script you should copy the examples in +%%PREFIX%%/etc/%%PORTNAME%%/ and at least add a +domain and a contact mail address. + +In order to run the script regularly to update +the certificates add this line to /etc/periodic.conf + +weekly_dehydrated_enable="YES" + +Additionally the following parameters can be added to +/etc/periodic.conf + +To run the certification renenewal as a different user +weekly_dehydrated_user="_letsencrypt" + +To run a script after the renewal (as root) +weekly_dehydrated_deployscript="%%PREFIX%%/etc/%%PORTNAME%%/deploy.sh" + +Additional flags for the periodic run go into +weekly_dehydrated_flags="-g" + Index: security/acme.sh/pkg-descr =================================================================== --- /dev/null +++ security/acme.sh/pkg-descr @@ -0,0 +1,13 @@ +ACME protocol client written in shell + +- Full ACME protocol implementation. +- Simple, powerful and very easy to use. You only need 3 minutes to learn it. +- Bash, dash and sh compatible. +- Simplest shell script for Let's Encrypt free certificate client. +- Purely written in Shell with no dependencies on python or the official Let's + Encrypt client. +- Just one script to issue, renew and install your certificates automatically. +- DOES NOT require root/sudoer access. +- Docker friendly. + +WWW: https://github.com/Neilpang/acme.sh/