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
1 changed files with 1 additions and 1 deletions

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