Skip to content

Instantly share code, notes, and snippets.

@dvigne
Created June 7, 2020 00:40
Show Gist options
  • Save dvigne/95aa60ccdb4f6c5570efd6fca8f40cee to your computer and use it in GitHub Desktop.
Save dvigne/95aa60ccdb4f6c5570efd6fca8f40cee to your computer and use it in GitHub Desktop.
Custom Teleconsole Install for Sam
#!/bin/sh
#
# This is a simple CLi-based installer. Usually it's used from the website as:
#
# curl https://www.teleconsole.com/get.sh | sh
#
#
FORMAT="tar.gz"
TARBALL="teleconsole-$$.$FORMAT"
HOST=teleconsole.com
OS=$(uname)
ARCH=$(uname -m)
URL="https://$HOST/client?os=$OS&arch=$ARCH&format=$FORMAT"
# 'teleconsole' will be installed into this dir:
DEST=/usr/local/bin
# find out what's the binary download URL for the latest version
# for this platform and save it as "tarball":
curl -o $TARBALL -L -f $URL
if [ $? -eq 0 ]
then
echo "Copying teleconsole binary into $DEST"
# unpack:
tar -xzf $TARBALL && mv -f teleconsole $DEST/
if [ $? -eq 0 ]
then
rm $TARBALL
echo "Teleconsole has been installed into $DEST/teleconsole"
exit 0
fi
else
echo "Failed to determine your platform.\nTry downloading from https://github.com/gravitational/teleconsole/releases"
fi
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment