diff options
author | Ronny (tastytea) Gutbrod <gentoo@tastytea.de> | 2022-07-15 17:49:51 +0200 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-08-23 06:24:00 +0100 |
commit | 957184a325e39b7a26b24c86b6f5356cc6c0e692 (patch) | |
tree | 899e2bf5d836cacfa39beed2e112ff9c0abe0cd9 /app-crypt | |
parent | net-im/synapse: add 1.65.0 (diff) | |
download | gentoo-957184a325e39b7a26b24c86b6f5356cc6c0e692.tar.gz gentoo-957184a325e39b7a26b24c86b6f5356cc6c0e692.tar.bz2 gentoo-957184a325e39b7a26b24c86b6f5356cc6c0e692.zip |
app-crypt/dehydrated: don't run cron job exactly on the hour
The Let's Encrypt API is often overwhelmed at 2:00 because a lot of
people call it exactly on the hour. I chose a number over 23 to make
minutes and hours instantly distinguishable.
Closes: https://bugs.gentoo.org/864895
Signed-off-by: Ronny (tastytea) Gutbrod <gentoo@tastytea.de>
Closes: https://github.com/gentoo/gentoo/pull/26420
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-crypt')
-rw-r--r-- | app-crypt/dehydrated/dehydrated-0.7.0-r1.ebuild | 50 | ||||
-rw-r--r-- | app-crypt/dehydrated/files/cron-r1 | 2 |
2 files changed, 52 insertions, 0 deletions
diff --git a/app-crypt/dehydrated/dehydrated-0.7.0-r1.ebuild b/app-crypt/dehydrated/dehydrated-0.7.0-r1.ebuild new file mode 100644 index 000000000000..c5872631d266 --- /dev/null +++ b/app-crypt/dehydrated/dehydrated-0.7.0-r1.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +DESCRIPTION="A client for signing certificates with an ACME-server" +HOMEPAGE="https://github.com/lukas2511/dehydrated" +SRC_URI="https://github.com/lukas2511/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="amd64 arm arm64 ~ppc64 ~riscv x86" +IUSE="+cron" + +RDEPEND="acct-group/dehydrated + acct-user/dehydrated + app-shells/bash + net-misc/curl + cron? ( virtual/cron )" + +PATCHES=( "${FILESDIR}"/${P}-fix-CN-extraction-for-older-openssl-versions.patch ) + +src_configure() { + default + sed -i 's,^#CONFIG_D=.*,CONFIG_D="/etc/dehydrated/config.d",' docs/examples/config || die "could not set config (CONFIG_D)" +} + +src_install() { + dobin ${PN} + insinto /etc/${PN} + doins docs/examples/{config,domains.txt,hook.sh} + fperms u+x /etc/${PN}/hook.sh + dodoc docs/*.md + + insinto /etc/${PN}/config.d + doins "${FILESDIR}"/00_gentoo.sh + + if use cron ; then + insinto /etc/cron.d + newins "${FILESDIR}"/cron-r1 ${PN} + fi +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]] ; then + einfo "See /etc/dehydrated/config for configuration." + + use cron && einfo "After finishing setup you should enable the cronjob in /etc/cron.d/dehydrated." + fi +} diff --git a/app-crypt/dehydrated/files/cron-r1 b/app-crypt/dehydrated/files/cron-r1 new file mode 100644 index 000000000000..31d1bb805a3e --- /dev/null +++ b/app-crypt/dehydrated/files/cron-r1 @@ -0,0 +1,2 @@ +# dehydrated cron job +#27 2 * * * dehydrated /usr/bin/dehydrated --cron |