author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Mon, 31 Jul 2023 01:24:19 +0300 | |
changeset 31 | 461eed8e7463 |
parent 1 | f497bf96ddc3 |
permissions | -rw-r--r-- |
1
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
1 |
#!/bin/bash |
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
2 |
|
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
3 |
set -e |
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
4 |
src=elastic |
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
5 |
|
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
6 |
cmd="curl -o /usr/share/keyrings/$src.asc https://artifacts.elastic.co/GPG-KEY-elasticsearch" |
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
7 |
eval $cmd |
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
8 |
|
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
9 |
cat <<EOF >/etc/apt/sources.list.d/$src.list |
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
10 |
# https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html |
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
11 |
# For new GPG key use: |
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
12 |
# $cmd |
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
13 |
|
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
14 |
deb [arch=amd64 signed-by=/usr/share/keyrings/$src.asc] https://artifacts.elastic.co/packages/8.x/apt stable main |
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
15 |
EOF |