25 lines
876 B
Bash
25 lines
876 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
set -exo pipefail
|
||
|
|
||
|
function main() {
|
||
|
{
|
||
|
upgradeSystem
|
||
|
apt-get install -qqy ca-certificates curl gnupg postgresql-client-14
|
||
|
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'
|
||
|
upgradeSystem
|
||
|
} > /dev/null
|
||
|
|
||
|
update-ca-certificates
|
||
|
|
||
|
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_debian.sh
|
||
|
DEBIAN_FRONTEND=noninteractive DEBCONF_NOWARNINGS=yes main
|