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

32 lines
586 B
Plaintext
Raw Normal View History

2022-10-30 15:53:04 +01:00
#!/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 \
2022-11-02 13:29:32 +01:00
{% for arg in k3s_args %}
{{ arg }} \
{% endfor %}
2022-10-30 15:53:04 +01:00
>>/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