Index: security/acme.sh/Makefile =================================================================== --- security/acme.sh/Makefile +++ security/acme.sh/Makefile @@ -2,8 +2,8 @@ PORTNAME= acme.sh PORTVERSION= 2.6.9 -PORTREVISION= 2 DISTVERSIONPREFIX= v +PORTREVISION= 4 CATEGORIES= security MAINTAINER= dvl@FreeBSD.org @@ -34,11 +34,15 @@ PORTDOCS= README.md +SUB_FILES= pkg-install + do-install: ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin/${PORTNAME} ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/deploy ${STAGEDIR}${EXAMPLESDIR}/dnsapi ( cd ${WRKSRC} && ${COPYTREE_BIN} deploy ${STAGEDIR}${EXAMPLESDIR} ) ( cd ${WRKSRC} && ${COPYTREE_BIN} dnsapi ${STAGEDIR}${EXAMPLESDIR} ) + ${MKDIR} ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d + ${INSTALL_DATA} ${FILESDIR}/acme.sh.newsyslog.conf.sample ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d do-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} Index: security/acme.sh/files/acme.sh.newsyslog.conf.sample =================================================================== --- /dev/null +++ security/acme.sh/files/acme.sh.newsyslog.conf.sample @@ -0,0 +1,6 @@ +# configuration file for newsyslog for acme.sh +# +# see newsyslog.conf(5) for details +# +# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] +/var/log/acme.sh.log acme:acme 640 90 * @T00 B Index: security/acme.sh/files/pkg-install.in =================================================================== --- /dev/null +++ security/acme.sh/files/pkg-install.in @@ -0,0 +1,35 @@ +#!/bin/sh +# +# $FreeBSD$ + +EXAMPLESDIR=${EXAMPLESDIR:=%%EXAMPLESDIR%%} + +if [ "$2" = "POST-INSTALL" ]; then + if [ ! -d ~acme/.acme.sh ]; then + /bin/mkdir ~acme/.acme.sh + /usr/sbin/chown acme:acme ~acme/.acme.sh + /bin/chmod 750 ~acme/.acme.sh + fi + + if [ ! -d ~acme/certs ]; then + /bin/mkdir ~acme/certs + /usr/sbin/chown acme:acme ~acme/certs + /bin/chmod 750 ~acme/certs + fi + + if [ ! -d ~acme/.acme.sh/dnsapi ]; then + /bin/ln -sf ${EXAMPLESDIR}/dnsapi ~acme/.acme.sh + fi + + if [ ! -f ~acme/.acme.sh/account.conf.sample ]; then + + /bin/cat << EOF >> ~acme/.acme.sh/account.conf.sample +NSUPDATE_SERVER="mydns.example.org" +NSUPDATE_KEY="/var/db/acme/Kmydns.example.org.+165+59977.key" +DEFAULT_DNS_SLEEP="10" +CERT_HOME="/var/db/acme/certs" +LOG_FILE='/var/log/acme.sh.log' +EOF + /bin/chmod 640 ~acme/.acme.sh/account.conf.sample + fi +fi Index: security/acme.sh/pkg-plist =================================================================== --- security/acme.sh/pkg-plist +++ security/acme.sh/pkg-plist @@ -1,4 +1,5 @@ sbin/acme.sh +etc/newsyslog.conf.d/acme.sh.newsyslog.conf.sample %%EXAMPLESDIR%%/deploy/README.md %%EXAMPLESDIR%%/deploy/apache.sh %%EXAMPLESDIR%%/deploy/cpanel.sh @@ -42,3 +43,4 @@ %%EXAMPLESDIR%%/dnsapi/dns_ovh.sh %%EXAMPLESDIR%%/dnsapi/dns_pdns.sh %%EXAMPLESDIR%%/dnsapi/dns_vscale.sh +@dir etc/newsyslog.conf.d