Skip to content

Commit

Permalink
app-metrics/prometheus-mysqld_exporter: Rev bump
Browse files Browse the repository at this point in the history
Ebuild changes:
===============
- Runscript: Add "use mysql" to depend()

- Runscript: Add start_post function

Package-Manager: Portage-2.3.24, Repoman-2.3.6
  • Loading branch information
Whissi committed Mar 29, 2018
1 parent f8302be commit a9e35ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,15 @@ configtest() {

depend() {
after net
use mysql
}

start_pre() {
if [ "${RC_CMD}" != "restart" ]; then
configtest || return 1
fi
}

start_post() {
service_set_value retry "${EXPORTER_TERMTIMEOUT}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@ src_prepare() {
src_compile() {
pushd src/${EGO_PN} || die
mkdir -p bin || die
GOPATH="${S}" promu build -v --prefix mysqld_exporter || die
GOPATH="${S}" promu build -v --prefix bin || die
popd || die
}

src_install() {
pushd src/${EGO_PN} || die
dobin mysqld_exporter/mysqld_exporter
dobin bin/mysqld_exporter
dodoc {README,CHANGELOG,CONTRIBUTING}.md
popd || die

keepdir /var/lib/mysqld_exporter /var/log/mysqld_exporter
fowners ${PN}:${PN} /var/lib/mysqld_exporter /var/log/mysqld_exporter
fperms 0770 /var/lib/mysqld_exporter

newinitd "${FILESDIR}"/${PN}.initd ${PN}
newinitd "${FILESDIR}"/${PN}-r1.initd ${PN}
newconfd "${FILESDIR}"/${PN}.confd ${PN}

insinto /etc/logrotate.d/
Expand Down

0 comments on commit a9e35ff

Please sign in to comment.