app-admin/consul: add logrotate config
authorZac Medico <zmedico@gentoo.org>
Thu, 20 Oct 2016 07:55:24 +0000 (00:55 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 20 Oct 2016 07:57:18 +0000 (00:57 -0700)
Package-Manager: portage-2.3.2

app-admin/consul/consul-0.6.4.ebuild
app-admin/consul/consul-0.7.0.ebuild
app-admin/consul/files/consul.logrotated [new file with mode: 0644]

index 89b6d542096882ba79acc1f299de2563d9bfcab1..760b1a0949717f7afaff902d080342a703840052 100644 (file)
@@ -164,6 +164,8 @@ src_install() {
 
        newinitd "${FILESDIR}/consul.initd" "${PN}"
        newconfd "${FILESDIR}/consul.confd" "${PN}"
+       insinto /etc/logrotate.d
+       newins "${FILESDIR}/${PN}.logrotated" "${PN}"
        systemd_dounit "${FILESDIR}/consul.service"
 
        find "${WORKDIR}"/src/${GO_PN} -mindepth 1 -maxdepth 1 -type f -delete || die
index dee540ff628a611b8891c8cb54556f44a951e527..c3b7b2fc3faa6e44cc53199c248fb770e3cf58c0 100644 (file)
@@ -104,6 +104,8 @@ src_install() {
 
        newinitd "${FILESDIR}/consul.initd" "${PN}"
        newconfd "${FILESDIR}/consul.confd" "${PN}"
+       insinto /etc/logrotate.d
+       newins "${FILESDIR}/${PN}.logrotated" "${PN}"
        systemd_dounit "${FILESDIR}/consul.service"
 
        find "${WORKDIR}"/src/${GO_PN} -mindepth 1 -maxdepth 1 -type f -delete || die
diff --git a/app-admin/consul/files/consul.logrotated b/app-admin/consul/files/consul.logrotated
new file mode 100644 (file)
index 0000000..e27b8aa
--- /dev/null
@@ -0,0 +1,8 @@
+/var/log/consul/consul.log {
+       su consul consul
+       missingok
+       size 5M
+       rotate 3
+       compress
+       copytruncate
+}