containerd.initd 797 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/openrc-run
  2. # Copyright 1999-2020 Gentoo Authors
  3. # Distributed under the terms of the GNU General Public License v2
  4. description="Containerd container runtime"
  5. command="/usr/bin/containerd"
  6. command_args="${command_args:-}"
  7. command_background="true"
  8. pidfile="${pidfile:-/run/${RC_SVCNAME}.pid}"
  9. start_stop_daemon_args="--stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log --stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log"
  10. start_pre() {
  11. checkpath -m 0750 -d "/var/log/${RC_SVCNAME}"
  12. ulimit -n 1048576
  13. # Having non-zero limits causes performance problems due to accounting overhead
  14. # in the kernel. We recommend using cgroups to do container-local accounting.
  15. ulimit -u unlimited
  16. return 0
  17. }
  18. start_post() {
  19. ewaitfile ${containerd_socket_delay:-5} /run/containerd/containerd.sock
  20. }