forked from gravitational/teleport
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·40 lines (35 loc) · 1.09 KB
/
install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
#
# the directory where Teleport binaries will be located
#
BINDIR=/usr/local/bin
#
# the directory where Teleport will keep its state/data
#
VARDIR=/var/lib/teleport
[ ! $(id -u) != "0" ] || { echo "ERROR: You must be root"; exit 1; }
echo "Starting Teleport installation..."
cd $(dirname $0)
mkdir -p $VARDIR $BINDIR
cp -f teleport tctl tsh tbot $BINDIR/ || exit 1
#
# What operating system is the user running?
#
unameOut="$(uname -s)"
case "${unameOut}" in
Linux*) machine=linux;;
Darwin*) machine=darwin;;
CYGWIN*) machine=cygwin;;
MINGW*) machine=minGw;;
*) machine="UNKNOWN:${unameOut}"
esac
echo "Teleport binaries have been copied to $BINDIR"
echo ""
echo "Thanks for installing Teleport."
echo ""
echo "Is it OK if we collect some info about your install?"
echo "Please run this command to send in a survey."
echo "Optional: Replace email to join our newsletter and get a swag package."
echo "$ curl -X POST https://usage.teleport.dev -F OS=${machine} -F use-case=\"access my ...\" -F email=\"[email protected]\""
echo ""
echo "Otherwise, ignore!"