diff --git a/app-acme-sh/APKBUILD b/app-acme-sh/APKBUILD index 9d29dd8..42c9b77 100644 --- a/app-acme-sh/APKBUILD +++ b/app-acme-sh/APKBUILD @@ -13,11 +13,11 @@ builddir="${srcdir}/acme.sh-${_commit}" options="!check" package() { - cd ${builddir} - sed -i 's|$HOME/.$PROJECT_NAME|/etc/acme.sh.d|' acme.sh mkdir -p ${pkgdir}/usr/bin - cp acme.sh ${pkgdir}/usr/bin/ + mkdir -p ${pkgdir}/etc/periodic/daily + sed 's|$HOME/.$PROJECT_NAME|/etc/acme.sh.d|' ${builddir}/acme.sh > ${pkgdir}/usr/bin/ chmod +x ${pkgdir}/usr/bin/acme.sh + cp source/acme-sh ${pkgdir}/etc/periodic/daily/ } sha512sums="93d38007c0c8187217ac220b09180c3a367a9b518d0bb777a58900de134f1afde54e6643c42426e18f65a18de0d77b0c685396b9c33198b927f0ce2b5da778d1 acme-sh-2.7.9.tar.gz" diff --git a/app-acme-sh/source/acme-sh b/app-acme-sh/source/acme-sh new file mode 100644 index 0000000..94303b8 --- /dev/null +++ b/app-acme-sh/source/acme-sh @@ -0,0 +1,5 @@ +#!/bin/sh + +# Sleep randomly up to 1hr to avoid peak on ACME server +/bin/sleep $(/usr/bin/shuf -i 60-3600 -n 1) +/usr/bin/acme.sh --cron >/dev/null