author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Sun, 07 May 2023 12:48:30 +0300 | |
changeset 20 | f1b38aa4fa52 |
parent 1 | f497bf96ddc3 |
permissions | -rw-r--r-- |
0
fcbf2f8a91fc
Adding Hashi & GCP repos to deb with sign keys.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
1 |
#!/bin/bash |
fcbf2f8a91fc
Adding Hashi & GCP repos to deb with sign keys.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
2 |
|
fcbf2f8a91fc
Adding Hashi & GCP repos to deb with sign keys.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
3 |
set -e |
1
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
4 |
src=hashicorp |
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
5 |
CODENAME=bookworm |
0
fcbf2f8a91fc
Adding Hashi & GCP repos to deb with sign keys.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
6 |
|
1
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
7 |
cmd="curl -o /usr/share/keyrings/$src.asc https://apt.releases.hashicorp.com/gpg" |
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
8 |
eval $cmd |
0
fcbf2f8a91fc
Adding Hashi & GCP repos to deb with sign keys.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
9 |
|
1
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
10 |
cat <<EOF >/etc/apt/sources.list.d/$src.list |
0
fcbf2f8a91fc
Adding Hashi & GCP repos to deb with sign keys.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
11 |
# https://www.hashicorp.com/blog/announcing-the-hashicorp-linux-repository |
fcbf2f8a91fc
Adding Hashi & GCP repos to deb with sign keys.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
12 |
# https://www.hashicorp.com/official-packaging-guide |
fcbf2f8a91fc
Adding Hashi & GCP repos to deb with sign keys.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
13 |
# List of distro releases. |
fcbf2f8a91fc
Adding Hashi & GCP repos to deb with sign keys.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
14 |
# For new GPG key use: |
1
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
15 |
# $cmd |
0
fcbf2f8a91fc
Adding Hashi & GCP repos to deb with sign keys.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
16 |
|
1
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
17 |
deb [signed-by=/usr/share/keyrings/$src.asc] https://apt.releases.hashicorp.com ${CODENAME} main |
0
fcbf2f8a91fc
Adding Hashi & GCP repos to deb with sign keys.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
18 |
EOF |