You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
k3s/scripts/dev-agent.sh

19 lines
422 B

6 years ago
#!/bin/bash
set -e
cd $(dirname $0)/..
6 years ago
# Prime sudo
sudo echo Compiling
6 years ago
if [ ! -e bin/containerd ]; then
./scripts/build
./scripts/package
else
rm -f ./bin/k3s-agent
go build -tags "apparmor seccomp" -o ./bin/k3s-agent ./cmd/agent/main.go
fi
6 years ago
echo Starting agent
sudo env "PATH=$(pwd)/bin:$PATH" ./bin/k3s-agent --debug agent -s https://localhost:6443 -t $(<${HOME}/.rancher/k3s/server/node-token) "$@"