diff options
author | Georgy Yakovlev <gyakovlev@gentoo.org> | 2021-12-18 23:32:50 -0800 |
---|---|---|
committer | Georgy Yakovlev <gyakovlev@gentoo.org> | 2021-12-18 23:33:00 -0800 |
commit | d0fafc653242b3674ec79cc418870e39de6241ac (patch) | |
tree | 2c9b120f4bcc657f0e6c7a24e039d18bb9b20a4f /app-containers/containerd/files | |
parent | Move {app-emulation -> app-containers}/docker-proxy (diff) | |
download | gentoo-d0fafc653242b3674ec79cc418870e39de6241ac.tar.gz gentoo-d0fafc653242b3674ec79cc418870e39de6241ac.tar.bz2 gentoo-d0fafc653242b3674ec79cc418870e39de6241ac.zip |
Move {app-emulation -> app-containers}/containerd
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'app-containers/containerd/files')
-rw-r--r-- | app-containers/containerd/files/containerd.initd | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/app-containers/containerd/files/containerd.initd b/app-containers/containerd/files/containerd.initd new file mode 100644 index 000000000000..6536fc9ef209 --- /dev/null +++ b/app-containers/containerd/files/containerd.initd @@ -0,0 +1,26 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="Containerd container runtime" +command="/usr/bin/containerd" +command_args="${command_args:-}" +command_background="true" +pidfile="${pidfile:-/run/${RC_SVCNAME}.pid}" +start_stop_daemon_args="--stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log --stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log" + +start_pre() { + checkpath -m 0750 -d "/var/log/${RC_SVCNAME}" + + ulimit -n 1048576 + + # Having non-zero limits causes performance problems due to accounting overhead + # in the kernel. We recommend using cgroups to do container-local accounting. + ulimit -u unlimited + + return 0 +} + +start_post() { + ewaitfile 5 /run/containerd/containerd.sock +} |