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

12 lines
272 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 2>&1
exec k3s agent ${K3S_OPTIONS} ${K3S_AGENT_OPTIONS} "$@"