aboutsummaryrefslogtreecommitdiffstats
path: root/community/k3s/k3s.initd
blob: a33073ff8f75bd6f04d92b0166fa742171a16df5 (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
#!/sbin/openrc-run

# Based on ...
#   https://raw.githubusercontent.com/rancher/k3s/master/install.sh
K3S_LOGFILE="${K3S_LOGFILE:-/var/log/${RC_SVCNAME}.log}"

supervisor=supervise-daemon

name="k3s"
command="/usr/bin/k3s"
command_args="${K3S_EXEC} ${K3S_OPTS} >>${K3S_LOGFILE} 2>&1"

output_log=${K3S_LOGFILE}
error_log=${K3S_LOGFILE}

pidfile="/run/k3s.pid"
respawn_delay=5
respawn_max=0

rc_ulimit="${K3S_ULIMIT:--c unlimited -n 1048576 -u unlimited}"

depend() {
	need net cgroups dbus
	after firewall
}

start_pre() {
	checkpath -f -m 0644 -o root:root "${K3S_LOGFILE}"
}