Improve Gentoo ebuild
This commit is contained in:
parent
058fe546a4
commit
9b382bedaa
@ -14,8 +14,7 @@ LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64"
|
||||
|
||||
EGIT_REPO_URI="git@code2.shh-dot-com.org:james/pgmon.git"
|
||||
EGIT_COMMIT="v1.0.0"
|
||||
SRC_URI="https://code2.shh-dot-com.org/james/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
DEPEND="
|
||||
${PYTHON_DEPS}
|
||||
@ -26,23 +25,32 @@ DEPEND="
|
||||
RDEPEND="${DEPEND}"
|
||||
BDEPEND=""
|
||||
|
||||
S="${WORKDIR}/${PN}"
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
# Install init script
|
||||
newinitd "${FILESDIR}/pgmon.openrc" pgmon
|
||||
newinitd "openrc/pgmon.initd" pgmon
|
||||
newconfd "openrc/pgmon.confd" pgmon
|
||||
|
||||
# Install systemd unit
|
||||
systemd_dounit "systemd/pgmon.service"
|
||||
|
||||
# Install script
|
||||
exeinto /usr/bin
|
||||
newexe "${S}/pgmon.py" pgmon
|
||||
newexe "pgmon.py" pgmon
|
||||
|
||||
# Install default config
|
||||
diropts -o root -g root -m 0755
|
||||
insinto /etc/pgmon
|
||||
doins "${FILESDIR}/pgmon.yml"
|
||||
doins "${S}/pgmon-metrics.yml"
|
||||
doins "sample-config/pgmon.yml"
|
||||
doins "sample-config/pgmon-metrics.yml"
|
||||
|
||||
# Install logrotate config
|
||||
insinto /etc/logrotate.d
|
||||
newins "${FILESDIR}/pgmon.logrotate" pgmon
|
||||
newins "logrotate/pgmon.logrotate" pgmon
|
||||
|
||||
# Install man page
|
||||
doman manpages/pgmon.1
|
||||
}
|
||||
|
||||
3
openrc/pgmon.confd
Normal file
3
openrc/pgmon.confd
Normal file
@ -0,0 +1,3 @@
|
||||
## Specify a different user to run the daemon
|
||||
#PGMON_USER=postgres
|
||||
#PGMON_GROUP=postgres
|
||||
Loading…
Reference in New Issue
Block a user