dda-backup/infrastructure/docker/image/resources/install.sh

25 lines
693 B
Bash
Raw Normal View History

2020-12-04 17:10:24 +00:00
#!/bin/bash
2023-11-03 09:48:24 +00:00
set -eux
2021-03-12 14:40:26 +00:00
function main() {
2023-11-03 09:48:24 +00:00
apt update > /dev/null;
apt install -qqy ca-certificates curl wget gnupg > /dev/null
2021-03-12 14:40:26 +00:00
sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt focal-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
2020-12-04 17:10:24 +00:00
2023-11-03 09:48:24 +00:00
apt update > /dev/null;
apt -qqy install wget postgresql-client-14 restic > /dev/null;
2020-12-04 17:10:24 +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