app-emulation/libpod: add init script a logrotate config
authorZac Medico <zmedico@gentoo.org>
Mon, 7 Jan 2019 20:09:01 +0000 (12:09 -0800)
committerZac Medico <zmedico@gentoo.org>
Mon, 7 Jan 2019 20:10:43 +0000 (12:10 -0800)
Package-Manager: Portage-2.3.54, Repoman-2.3.12
Signed-off-by: Zac Medico <zmedico@gentoo.org>
app-emulation/libpod/files/podman.initd [new file with mode: 0644]
app-emulation/libpod/files/podman.logrotated [new file with mode: 0644]
app-emulation/libpod/libpod-0.12.1.2.ebuild

diff --git a/app-emulation/libpod/files/podman.initd b/app-emulation/libpod/files/podman.initd
new file mode 100644 (file)
index 0000000..b590be1
--- /dev/null
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+# Copyright 2015-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="Podman Remote API Service"
+LOG_PATH="/var/log/${RC_SVCNAME}"
+RUN_PATH="/run/${RC_SVCNAME}"
+pidfile="${RUN_PATH}/${RC_SVCNAME}.pid"
+command="/usr/bin/podman"
+command_args="--log-level debug varlink -t 0 unix:/run/podman/io.podman"
+command_background="true"
+start_stop_daemon_args="--stdout ${LOG_PATH}/${RC_SVCNAME}.log --stderr ${LOG_PATH}/${RC_SVCNAME}.log"
+
+start() {
+       checkpath -d "${RUN_PATH}" "${LOG_PATH}"
+       default_start
+}
diff --git a/app-emulation/libpod/files/podman.logrotated b/app-emulation/libpod/files/podman.logrotated
new file mode 100644 (file)
index 0000000..b9d7234
--- /dev/null
@@ -0,0 +1,7 @@
+/var/log/podman/podman.log {
+       missingok
+       size 5M
+       rotate 3
+       compress
+       copytruncate
+}
index b3bc6469606d30672ea75c6c96928572a7c18ee0..80dbb5f4f191b0c20b99f44c473dd6ab67024134 100644 (file)
@@ -96,4 +96,11 @@ src_install() {
 
        insinto /etc/containers
        newins test/registries.conf registries.conf.example
+
+       newinitd "${FILESDIR}"/podman.initd podman
+
+       insinto /etc/logrotate.d
+       newins "${FILESDIR}/podman.logrotated" podman
+
+       keepdir /var/lib/containers
 }