Skip to content

Commit 5dade5d

Browse files
authored
adds dirmngr to debian install script (#3492)
* adds dirmngr to debian install script * only install dirmngr if it is available in the cache * better comment
1 parent f825a54 commit 5dade5d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packaging/datadog-agent/source/install_agent.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@ elif [ $OS = "Debian" ]; then
139139
printf "\033[34m\n* Installing apt-transport-https\n\033[0m\n"
140140
$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"
141141
$sudo_cmd apt-get install -y apt-transport-https
142+
# Only install dirmngr if it's available in the cache
143+
# it may not be available on Ubuntu <= 14.04 but it's not required there
144+
cache_output=`apt-cache search dirmngr`
145+
if [ ! -z "$cache_output" ]; then
146+
$sudo_cmd apt-get install -y dirmngr
147+
fi
142148
printf "\033[34m\n* Installing APT package sources for Datadog\n\033[0m\n"
143149
$sudo_cmd sh -c "echo 'deb https://apt.datadoghq.com/ stable main' > /etc/apt/sources.list.d/datadog.list"
144150
$sudo_cmd apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 C7A7DA52

0 commit comments

Comments
 (0)