Skip to content

Commit

Permalink
Merge pull request #2378 from DataDog/olivielpeau/ignore-update-failure
Browse files Browse the repository at this point in the history
[install script] Ignore `apt-get update` failures + use https for apt repo
  • Loading branch information
olivielpeau committed Mar 28, 2016
2 parents cda8715 + 8958935 commit 0ad7214
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packaging/datadog-agent/source/install_agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ if [ $OS = "RedHat" ]; then
$sudo_cmd yum -y --disablerepo='*' --enablerepo='datadog' install datadog-agent
elif [ $OS = "Debian" ]; then
printf "\033[34m\n* Installing apt-transport-https\n\033[0m\n"
$sudo_cmd apt-get update
$sudo_cmd apt-get update || printf "\033[31m'apt-get update' failed, the script will not install the latest version of apt-transport-https.\033[0m\n"
$sudo_cmd apt-get install -y apt-transport-https
printf "\033[34m\n* Installing APT package sources for Datadog\n\033[0m\n"
$sudo_cmd sh -c "echo 'deb http://apt.datadoghq.com/ stable main' > /etc/apt/sources.list.d/datadog.list"
$sudo_cmd sh -c "echo 'deb https://apt.datadoghq.com/ stable main' > /etc/apt/sources.list.d/datadog.list"
$sudo_cmd apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 C7A7DA52

printf "\033[34m\n* Installing the Datadog Agent package\n\033[0m\n"
Expand Down

0 comments on commit 0ad7214

Please sign in to comment.