Last active
February 28, 2018 01:01
-
-
Save okkez/831ab852528d52eabad0684c938db17b to your computer and use it in GitHub Desktop.
Install td-agent3 on Debian
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "==============================" | |
echo " td-agent Installation Script " | |
echo "==============================" | |
echo "This script requires superuser access to install apt packages." | |
echo "You will be prompted for your password by sudo." | |
# clear any previous sudo permission | |
sudo -k | |
# run inside sudo | |
sudo sh <<SCRIPT | |
curl https://packages.treasuredata.com/GPG-KEY-td-agent | apt-key add - | |
# add treasure data repository to apt | |
echo "deb http://packages.treasuredata.com/3/debian/$(lsb_release -sc)/ $(lsb_release -sc) contrib" > /etc/apt/sources.list.d/treasure-data.list | |
# update your sources | |
apt update | |
# install the toolbelt | |
apt install -y td-agent | |
SCRIPT | |
if [ $? = 0 ]; then | |
# message | |
echo "" | |
echo "Installation completed. Happy Logging!" | |
echo "" | |
else | |
# message | |
echo "" | |
echo "Installation incompleted. Check above messages." | |
echo "" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment