aboutsummaryrefslogtreecommitdiffstats
path: root/community/containerd/containerd.initd
blob: ee2fafe1aa21f64a910fa583855bdf027500091d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/sbin/openrc-run
supervisor=supervise-daemon

name="Container Daemon"
description="Standalone containerd (usually started by Docker)"

extra_started_commands="reload"
description_reload="Reload configuration without exiting"

command="${containerd_command:-/usr/bin/containerd}"
command_args="${containerd_opts}"
rc_ulimit="${ulimit_opts:--c unlimited -n 1048576 -u unlimited}"
retry="${signal_retry:-TERM/60/KILL/10}"

log_file="${log_file:-/var/log/${RC_SVCNAME}.log}"
err_file="${err_file:-${log_file}}"
log_mode="${log_mode:-0644}"
log_owner="${log_owner:-root:root}"

supervise_daemon_args="${supervise_daemon_opts:---stderr \"${err_file}\" --stdout \"${log_file}\"}"

depend() {
	need sysfs cgroups
}

start_pre() {
	checkpath -f -m "$log_mode" -o "$log_owner" "$log_file" "$err_file"
}

reload() {
	ebegin "Reloading configuration"
	$supervisor $RC_SVCNAME --signal HUP
	eend $?
}