Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Jul 2017 22:22:04 +0000 (UTC)
From:      Dan Langille <dvl@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r444990 - in head/security/acme.sh: . files
Message-ID:  <201707032222.v63MM4VY040502@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dvl
Date: Mon Jul  3 22:22:04 2017
New Revision: 444990
URL: https://svnweb.freebsd.org/changeset/ports/444990

Log:
  Add some sane defaults in account.conf to get you started.
  Supply a link to the dnsapi/deploy scripts so it all just works.
  Create ~acme/.acme.sh & ~acme/certs to make things easier.
  Also provide a newsyslog.conf sample file for the log file rotation.
  
  Differential Revision:	https://reviews.freebsd.org/D11450

Added:
  head/security/acme.sh/files/
  head/security/acme.sh/files/acme.sh   (contents, props changed)
  head/security/acme.sh/files/pkg-install.in   (contents, props changed)
  head/security/acme.sh/files/pkg-message.in   (contents, props changed)
Modified:
  head/security/acme.sh/Makefile
  head/security/acme.sh/pkg-plist

Modified: head/security/acme.sh/Makefile
==============================================================================
--- head/security/acme.sh/Makefile	Mon Jul  3 20:40:27 2017	(r444989)
+++ head/security/acme.sh/Makefile	Mon Jul  3 22:22:04 2017	(r444990)
@@ -2,8 +2,8 @@
 
 PORTNAME=	acme.sh
 PORTVERSION=	2.6.9
-PORTREVISION=	2
 DISTVERSIONPREFIX=	v
+PORTREVISION=	3
 CATEGORIES=	security
 
 MAINTAINER=	dvl@FreeBSD.org
@@ -34,11 +34,14 @@ WGET_RUN_DEPENDS=	wget:ftp/wget
 
 PORTDOCS=	README.md
 
+SUB_FILES=	pkg-install pkg-message
+
 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} )
+	${INSTALL_DATA} ${FILESDIR}/acme.sh ${STAGEDIR}${EXAMPLESDIR}
 
 do-install-DOCS-on:
 	${MKDIR} ${STAGEDIR}${DOCSDIR}

Added: head/security/acme.sh/files/acme.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/acme.sh/files/acme.sh	Mon Jul  3 22:22:04 2017	(r444990)
@@ -0,0 +1,6 @@
+# acme.sh configuration file for newsyslog.conf
+#
+# 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

Added: head/security/acme.sh/files/pkg-install.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/acme.sh/files/pkg-install.in	Mon Jul  3 22:22:04 2017	(r444990)
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# $FreeBSD$
+
+if [ "$2" = "POST-INSTALL" ]; then
+    if [ ! -d ~acme/.acme.sh ]; then
+        /usr/bin/install -d -o acme -g acme -m 750 ~acme/.acme.sh
+    fi
+
+    if [ ! -d ~acme/certs ]; then    
+        /usr/bin/install -d -o acme -g acme -m 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

Added: head/security/acme.sh/files/pkg-message.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/acme.sh/files/pkg-message.in	Mon Jul  3 22:22:04 2017	(r444990)
@@ -0,0 +1,19 @@
+
+
+This script will create the following directories if they do not exist:
+
+ ~acme/.acme.sh
+ ~acme/certs
+
+The script will also install ~acme/.acme.sh/account.conf.sample which has
+sane defaults.  Copy this to ~acme/.acme.sh/account.conf and edit contents
+to suit.
+
+In the %%EXAMPLESDIR%% directory, you can find the dnsapi 
+scripts which will be useful if you decide to use dns-01 challenges. Also 
+included are the deploy scripts.
+
+A newsyslog.conf sample file is provided at %%EXAMPLESDIR%%/acme.sh
+and you could create a symlink from that to %%PREFIX%%/etc/newsyslog.conf.d/
+
+

Modified: head/security/acme.sh/pkg-plist
==============================================================================
--- head/security/acme.sh/pkg-plist	Mon Jul  3 20:40:27 2017	(r444989)
+++ head/security/acme.sh/pkg-plist	Mon Jul  3 22:22:04 2017	(r444990)
@@ -1,4 +1,5 @@
 sbin/acme.sh
+%%EXAMPLESDIR%%/acme.sh
 %%EXAMPLESDIR%%/deploy/README.md
 %%EXAMPLESDIR%%/deploy/apache.sh
 %%EXAMPLESDIR%%/deploy/cpanel.sh



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707032222.v63MM4VY040502>