ansible/roles/k3s/templates/init.d/k3s.j2

32 lines
586 B
Django/Jinja
Executable File

#!/sbin/openrc-run
depend() {
after network-online
want cgroups
}
start_pre() {
rm -f /tmp/k3s.*
}
supervisor=supervise-daemon
name=k3s
command="/usr/local/bin/k3s"
command_args="server \
{% for arg in k3s_args %}
{{ arg }} \
{% endfor %}
>>/var/log/k3s.log 2>&1"
output_log=/var/log/k3s.log
error_log=/var/log/k3s.log
pidfile="/var/run/k3s.pid"
respawn_delay=5
respawn_max=0
set -o allexport
if [ -f /etc/environment ]; then source /etc/environment; fi
if [ -f /etc/rancher/k3s/k3s.env ]; then source /etc/rancher/k3s/k3s.env; fi
set +o allexport