void-packages/srcpkgs/k3s/files/k3s-agent/run

11 lines
262 B
Bash
Executable File

#!/bin/sh
set --
[ -r /etc/k3s/config ] && . /etc/k3s/config
[ -r conf ] && . ./conf
if [ 0 = $# ]; then
set -- \
${K3S_SERVER:+--server="${K3S_SERVER}"} \
${K3S_TOKEN:+--token="${K3S_TOKEN}"}
fi
exec k3s agent ${K3S_OPTIONS} ${K3S_AGENT_OPTIONS} "$@"