use /etc/apt/trusted.gpg.d/ instead of apt-key add

This commit is contained in:
j 2023-12-08 16:17:21 +00:00
parent bc3208a846
commit 74fca45a9f

View file

@ -1,5 +1,5 @@
#!/bin/sh
curl -sL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
curl -sL https://artifacts.elastic.co/GPG-KEY-elasticsearch > /etc/apt/trusted.gpg.d/elasticsearch.asc
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" > /etc/apt/sources.list.d/elasticsearch.list
apt-get update -qq
apt-get -y install elasticsearch