2020-12-04 17:10:24 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-12-06 10:52:42 +00:00
|
|
|
set -exo pipefail
|
2023-11-03 09:48:24 +00:00
|
|
|
|
2021-03-12 14:40:26 +00:00
|
|
|
function main() {
|
2023-12-06 10:52:42 +00:00
|
|
|
{
|
|
|
|
apt-get update
|
|
|
|
apt-get upgrade -y
|
|
|
|
apt-get install -qqy ca-certificates curl gnupg postgresql-client-14
|
2023-12-06 16:08:41 +00:00
|
|
|
curl -Ss --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/postgresql-common_pgdg_archive_keyring.gpg
|
|
|
|
sh -c 'echo "deb [signed-by=/etc/apt/trusted.gpg.d/postgresql-common_pgdg_archive_keyring.gpg] https://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
|
|
|
|
apt-get upgrade -y
|
2023-12-06 10:52:42 +00:00
|
|
|
} > /dev/null
|
2023-12-06 16:08:41 +00:00
|
|
|
|
2021-03-12 14:40:26 +00:00
|
|
|
update-ca-certificates
|
2020-12-04 17:10:24 +00:00
|
|
|
|
2021-03-12 14:40:26 +00:00
|
|
|
install -m 0400 /tmp/functions.sh /usr/local/lib/
|
|
|
|
install -m 0400 /tmp/pg-functions.sh /usr/local/lib/
|
|
|
|
install -m 0400 /tmp/file-functions.sh /usr/local/lib/
|
|
|
|
|
|
|
|
cleanupDocker
|
|
|
|
}
|
|
|
|
|
|
|
|
source /tmp/install_functions.sh
|
|
|
|
main
|