mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
app-crypt/dehydrated: revbump for better system integration
Package-Manager: Portage-2.3.3, Repoman-2.3.1
This commit is contained in:
64
app-crypt/dehydrated/dehydrated-0.4.0-r1.ebuild
Normal file
64
app-crypt/dehydrated/dehydrated-0.4.0-r1.ebuild
Normal file
@@ -0,0 +1,64 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit user
|
||||
|
||||
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 ~x86"
|
||||
|
||||
DEPEND="virtual/cron"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
app-shells/bash
|
||||
"
|
||||
|
||||
src_configure() {
|
||||
default
|
||||
sed -i 's,^#CONFIG_D=.*",CONFIG_D="/etc/dehydrated/config.d",' docs/examples/config || die "could not set config"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin "${PN}"
|
||||
insinto "/etc/${PN}"
|
||||
doins docs/examples/{config,domains.txt,hook.sh}
|
||||
dodoc docs/*.md
|
||||
|
||||
insinto /etc/"${PN}"/config.d
|
||||
doins "${FILESDIR}"/00_gentoo.sh
|
||||
|
||||
insinto "/etc/cron.d"
|
||||
newins "${FILESDIR}"/cron "${PN}"
|
||||
|
||||
dodir /etc/"${PN}"/config.d
|
||||
keepdir /etc/"${PN}"/config.d
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
enewgroup "${PN}"
|
||||
enewuser "${PN}" -1 -1 /var/lib/"${PN}" "${PN}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ "${REPLACING_VERSIONS}" =~ (0\.3\.1|0\.4\.0) ]]; then
|
||||
ewarn ""
|
||||
ewarn "The new default BASEDIR is now '/var/lib/dehydrated'"
|
||||
ewarn "Please consider migrating your data with a command like"
|
||||
ewarn ""
|
||||
ewarn " 'mv -v /etc/dehydrated/{accounts,archive,certs,lock} /var/lib/dehydrated'"
|
||||
ewarn ""
|
||||
ewarn "and make sure BASEDIR is set to '/var/lib/dehydrated'"
|
||||
ewarn ""
|
||||
fi
|
||||
einfo "See /etc/dehydrated/config for configuration."
|
||||
einfo "After finishing setup you should enable the cronjob in /etc/cron.d/dehydrated."
|
||||
}
|
||||
2
app-crypt/dehydrated/files/00_gentoo.sh
Normal file
2
app-crypt/dehydrated/files/00_gentoo.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
# base config required for gentoo defaults
|
||||
BASEDIR="/var/lib/dehydrated"
|
||||
2
app-crypt/dehydrated/files/cron
Normal file
2
app-crypt/dehydrated/files/cron
Normal file
@@ -0,0 +1,2 @@
|
||||
# dehydrated cron job
|
||||
#0 2 * * * dehydrated /usr/bin/dehydrated --cron
|
||||
Reference in New Issue
Block a user