summaryrefslogtreecommitdiff
path: root/app-emulation/libpod
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2019-01-07 12:09:01 -0800
committerZac Medico <zmedico@gentoo.org>2019-01-07 12:10:43 -0800
commitb07a3c32ff4434204fc1d325497ec166d9c3b0d5 (patch)
tree3eb76dd1351774f07b33391f61f05232f8de744c /app-emulation/libpod
parent2c00aa56056878ddb20ecd9f171c155d76a875bd (diff)
downloadgentoo-b07a3c32ff4434204fc1d325497ec166d9c3b0d5.tar.gz
gentoo-b07a3c32ff4434204fc1d325497ec166d9c3b0d5.tar.xz
app-emulation/libpod: add init script a logrotate config
Package-Manager: Portage-2.3.54, Repoman-2.3.12 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'app-emulation/libpod')
-rw-r--r--app-emulation/libpod/files/podman.initd17
-rw-r--r--app-emulation/libpod/files/podman.logrotated7
-rw-r--r--app-emulation/libpod/libpod-0.12.1.2.ebuild7
3 files changed, 31 insertions, 0 deletions
diff --git a/app-emulation/libpod/files/podman.initd b/app-emulation/libpod/files/podman.initd
new file mode 100644
index 00000000000..b590be16a1b
--- /dev/null
+++ b/app-emulation/libpod/files/podman.initd
@@ -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
index 00000000000..b9d723451b0
--- /dev/null
+++ b/app-emulation/libpod/files/podman.logrotated
@@ -0,0 +1,7 @@
+/var/log/podman/podman.log {
+ missingok
+ size 5M
+ rotate 3
+ compress
+ copytruncate
+}
diff --git a/app-emulation/libpod/libpod-0.12.1.2.ebuild b/app-emulation/libpod/libpod-0.12.1.2.ebuild
index b3bc6469606..80dbb5f4f19 100644
--- a/app-emulation/libpod/libpod-0.12.1.2.ebuild
+++ b/app-emulation/libpod/libpod-0.12.1.2.ebuild
@@ -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
}