diff options
author | George Rawlinson | 2018-08-07 19:12:24 +1200 |
---|---|---|
committer | George Rawlinson | 2018-08-07 19:12:24 +1200 |
commit | 6e6b6026d36aff0732fc3f445def25dddae2eb53 (patch) | |
tree | d56eed91a6781ffbd6569ecf9bc4baddd82a984b | |
parent | 5adf9df753ca926ea588822303ef4519d1858e56 (diff) | |
download | aur-6e6b6026d36aff0732fc3f445def25dddae2eb53.tar.gz |
feat: add systemd timer/unit
source: acmetool AUR package
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | .gitignore | 12 | ||||
-rw-r--r-- | PKGBUILD | 35 | ||||
-rw-r--r-- | acmetool.conf | 1 | ||||
-rw-r--r-- | acmetool.service | 20 | ||||
-rw-r--r-- | acmetool.timer | 10 |
6 files changed, 80 insertions, 11 deletions
@@ -1,15 +1,24 @@ pkgbase = acmetool-bin - pkgdesc = An easy-to-use command line tool for automatically acquiring certificates from ACME servers - Precompiled cgo binary from official repository + pkgdesc = Command line tool for automatically acquiring certificates from ACME servers (official precompiled cgo binary) pkgver = 0.0.67 - pkgrel = 2 + pkgrel = 3 url = https://github.com/hlandau/acme arch = x86_64 license = MIT + depends = libcap provides = acmetool conflicts = acmetool conflicts = acmetool-git source = acmetool-bin-v0.0.67.tar.gz::https://github.com/hlandau/acme/releases/download/v0.0.67/acmetool-v0.0.67-linux_amd64_cgo.tar.gz + source = LICENSE::https://raw.githubusercontent.com/hlandau/rilts/master/licences/COPYING.MIT + source = acmetool.conf + source = acmetool.timer + source = acmetool.service sha512sums = 6502616e9bc7ba8905774158b7a007a929ca67ceb6559bce27dbf162ceb38b23424d2c7ee2a89ca9b51575e292b1e4f157d72c48b4d8bd1039dabbd4ef313978 + sha512sums = 68678af7dbe694b371171c8f19481670590c4fc659a367c8aabfcf8ecbcb9406ce2fa9ae3966bab21a5c447dd5663ee6162148e6dfac87707e0633c35782469e + sha512sums = 79133c499779c9610852e5b03e923d5d886cc56f274a73c91d6a27d0c52152975bdd95e3b3ccb4e7dd0e75d8072c1c1c4db54b5620f222297fed12a2fc223386 + sha512sums = 60dc78a7404101606f6a3e1107c01ca84ab46e391b3085f98695ecdfe01470d38efabcda4c3b0e631d3ff82741c8c565f7f29cec3d40cad9c1eae090efeddfb9 + sha512sums = bc7d6750d115a0aa19bb73d50252fa4758ebb275bca466a513ddd5c857e9454b6c4c0c5cdaa285a316f81ad50f611ceb154afed81d9a76da737645ffe9129581 pkgname = acmetool-bin diff --git a/.gitignore b/.gitignore index 6cf5bf838aee..706b81292a7f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,17 @@ +# Directories +pkg/ +src/ + +# Archives *.tar *.tar.* *.zip *.tgz + +# Logs *.log *.log.* *.sig -pkg/ -src/ + +# Files +LICENSE @@ -2,21 +2,42 @@ pkgname=acmetool-bin pkgver=0.0.67 -pkgrel=2 -pkgdesc="An easy-to-use command line tool for automatically acquiring certificates from ACME servers - Precompiled cgo binary from official repository" +pkgrel=3 +pkgdesc="Command line tool for automatically acquiring certificates from ACME servers (official precompiled cgo binary)" arch=('x86_64') url="https://github.com/hlandau/acme" license=('MIT') provides=('acmetool') conflicts=('acmetool' 'acmetool-git') -source=("${pkgname}-v${pkgver}.tar.gz::https://github.com/hlandau/acme/releases/download/v${pkgver}/acmetool-v${pkgver}-linux_amd64_cgo.tar.gz") -sha512sums=('6502616e9bc7ba8905774158b7a007a929ca67ceb6559bce27dbf162ceb38b23424d2c7ee2a89ca9b51575e292b1e4f157d72c48b4d8bd1039dabbd4ef313978') +depends=(libcap) +source=("${pkgname}-v${pkgver}.tar.gz::https://github.com/hlandau/acme/releases/download/v${pkgver}/acmetool-v${pkgver}-linux_amd64_cgo.tar.gz" + "LICENSE::https://raw.githubusercontent.com/hlandau/rilts/master/licences/COPYING.MIT" + "acmetool.conf" + "acmetool.timer" + "acmetool.service") +sha512sums=('6502616e9bc7ba8905774158b7a007a929ca67ceb6559bce27dbf162ceb38b23424d2c7ee2a89ca9b51575e292b1e4f157d72c48b4d8bd1039dabbd4ef313978' + '68678af7dbe694b371171c8f19481670590c4fc659a367c8aabfcf8ecbcb9406ce2fa9ae3966bab21a5c447dd5663ee6162148e6dfac87707e0633c35782469e' + '79133c499779c9610852e5b03e923d5d886cc56f274a73c91d6a27d0c52152975bdd95e3b3ccb4e7dd0e75d8072c1c1c4db54b5620f222297fed12a2fc223386' + '60dc78a7404101606f6a3e1107c01ca84ab46e391b3085f98695ecdfe01470d38efabcda4c3b0e631d3ff82741c8c565f7f29cec3d40cad9c1eae090efeddfb9' + 'bc7d6750d115a0aa19bb73d50252fa4758ebb275bca466a513ddd5c857e9454b6c4c0c5cdaa285a316f81ad50f611ceb154afed81d9a76da737645ffe9129581') package() { # add bin cd "${srcdir}/acmetool-v${pkgver}-linux_amd64_cgo" - install -Dm755 bin/acmetool "${pkgdir}/usr/bin/acmetool" + install -Dm755 -t "${pkgdir}/usr/bin" bin/acmetool - # add man page - install -Dm644 doc/acmetool.8 "${pkgdir}/usr/share/man/man8/acmetool.8" + # add documentation + install -Dm644 -t "${pkgdir}/usr/share/man/man8" doc/acmetool.8 + install -Dm644 -t "${pkgdir}/usr/share/doc/${pkgname}" README.md + + # add license + install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" "${srcdir}/LICENSE" + + # copy systemd units (service and timer) + install -Dm644 -t "${pkgdir}/usr/lib/systemd/system" \ + ${srcdir}/acmetool.service \ + ${srcdir}/acmetool.timer + + # copy acmetool.tmpfiles + install -Dm644 -t "${pkgdir}/usr/lib/tmpfiles.d/" ${srcdir}/acmetool.conf } diff --git a/acmetool.conf b/acmetool.conf new file mode 100644 index 000000000000..32f4a8fa7631 --- /dev/null +++ b/acmetool.conf @@ -0,0 +1 @@ +d /run/acme 0755 root root - - diff --git a/acmetool.service b/acmetool.service new file mode 100644 index 000000000000..151341421d63 --- /dev/null +++ b/acmetool.service @@ -0,0 +1,20 @@ +[Unit] +Description=Reconcile Let's Encrypt certificates +Documentation=man:acmetool(8) +After=nss-lookup.target apache2.service nginx.service openresty.service + +[Service] +Type=oneshot +ExecStart=/usr/bin/acmetool --batch reconcile +TimeoutStartSec=5min +CapabilityBoundingSet=CAP_CHOWN CAP_NET_BIND_SERVICE +NoNewPrivileges=yes +PrivateTmp=yes +PrivateDevices=yes +ProtectSystem=strict +ReadWritePaths=/var/lib/acme /run/acme +ProtectHome=yes +ProtectKernelTunables=yes +ProtectControlGroups=yes +RestrictRealtime=yes +RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 diff --git a/acmetool.timer b/acmetool.timer new file mode 100644 index 000000000000..8ab9e54f3417 --- /dev/null +++ b/acmetool.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Reconcile Let's Encrypt certificates twice daily + +[Timer] +OnCalendar=*-*-* 00,12:00:00 +RandomizedDelaySec=1h +Persistent=yes + +[Install] +WantedBy=timers.target |