summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2021-12-19 23:29:50 -0800
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2021-12-20 00:51:31 -0800
commit28e20789d699f4e9cc0a4107b84b4e5566391bdb (patch)
treec17b7a669153c985a8cbe192aeee71e77f191b36 /app-containers/cri-o/files
parentMove {app-emulation -> app-containers}/containers-storage (diff)
downloadgentoo-28e20789d699f4e9cc0a4107b84b4e5566391bdb.tar.gz
gentoo-28e20789d699f4e9cc0a4107b84b4e5566391bdb.tar.bz2
gentoo-28e20789d699f4e9cc0a4107b84b4e5566391bdb.zip
Move {app-emulation -> app-containers}/cri-o
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'app-containers/cri-o/files')
-rw-r--r--app-containers/cri-o/files/cri-o.logrotated7
-rw-r--r--app-containers/cri-o/files/crio.initd35
2 files changed, 42 insertions, 0 deletions
diff --git a/app-containers/cri-o/files/cri-o.logrotated b/app-containers/cri-o/files/cri-o.logrotated
new file mode 100644
index 000000000000..fb0b8b14a8a1
--- /dev/null
+++ b/app-containers/cri-o/files/cri-o.logrotated
@@ -0,0 +1,7 @@
+/var/log/crio/crio.log {
+ missingok
+ size 5M
+ rotate 3
+ compress
+ copytruncate
+}
diff --git a/app-containers/cri-o/files/crio.initd b/app-containers/cri-o/files/crio.initd
new file mode 100644
index 000000000000..9e6383ac976b
--- /dev/null
+++ b/app-containers/cri-o/files/crio.initd
@@ -0,0 +1,35 @@
+#!/sbin/openrc-run
+# Copyright 2015-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="OCI Kubernetes Container Runtime daemon"
+pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
+extra_started_commands="reload"
+command="/usr/bin/${RC_SVCNAME}"
+command_args="${command_args}"
+command_background="true"
+start_stop_daemon_args=" \
+ --stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log \
+ --stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log"
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ checkpath --directory --owner root:root --mode 0775 \
+ /var/log/${RC_SVCNAME}
+ checkpath --file --owner root:root --mode 0644 \
+ /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log
+}
+
+start() {
+ checkconfig
+ default_start
+}
+
+reload() {
+ ebegin "Reloading ${RC_SVCNAME}"
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $?
+}