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=gcp |
0
fcbf2f8a91fc
Adding Hashi & GCP repos to deb with sign keys.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
5 |
|
1
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
6 |
cmd="curl -o /usr/share/keyrings/$src.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg" |
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
7 |
eval $cmd |
0
fcbf2f8a91fc
Adding Hashi & GCP repos to deb with sign keys.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
8 |
|
1
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
9 |
cat <<EOF >/etc/apt/sources.list.d/$cmd.list |
0
fcbf2f8a91fc
Adding Hashi & GCP repos to deb with sign keys.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
10 |
# https://cloud.google.com/compute/docs/troubleshooting/known-issues#keyexpired-2 |
fcbf2f8a91fc
Adding Hashi & GCP repos to deb with sign keys.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
11 |
# 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
|
12 |
# $cmd |
0
fcbf2f8a91fc
Adding Hashi & GCP repos to deb with sign keys.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
13 |
|
1
f497bf96ddc3
Adding Elastic& Fluenbit repos to deb with sign keys. Generalized code.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
0
diff
changeset
|
14 |
deb [signed-by=/usr/share/keyrings/$src.gpg] http://packages.cloud.google.com/apt cloud-sdk main |
0
fcbf2f8a91fc
Adding Hashi & GCP repos to deb with sign keys.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
15 |
EOF |