Add acme cron script to the package

This commit is contained in:
Disassembler 2018-11-06 22:07:27 +01:00
parent 12869d5dca
commit 0ffbe9bb58
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
2 changed files with 8 additions and 3 deletions

View File

@ -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"

View File

@ -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