netmaker/scripts/netclient-install.sh

15 lines
285 B
Bash
Raw Normal View History

2021-03-30 06:12:30 +08:00
#!/bin/sh
set -e
2021-06-03 12:55:39 +08:00
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
2021-03-30 19:57:51 +08:00
[ -z "$KEY" ] && KEY=nokey;
2021-03-30 06:12:30 +08:00
2021-08-20 20:11:09 +08:00
wget -O netclient https://github.com/gravitl/netmaker/releases/download/latest/netclient
2021-03-30 06:12:30 +08:00
chmod +x netclient
2021-06-01 06:05:48 +08:00
sudo ./netclient join -t $KEY
2021-03-30 06:12:30 +08:00
rm -f netclient