Use apt and set -eux

This commit is contained in:
erik 2023-11-03 10:48:24 +01:00
parent 3ccd1b8643
commit 05a824410d

View file

@ -1,13 +1,15 @@
#!/bin/bash #!/bin/bash
set -eux
function main() { function main() {
apt-get update > /dev/null; apt update > /dev/null;
apt-get install -qqy ca-certificates curl wget gnupg > /dev/null apt install -qqy ca-certificates curl wget gnupg > /dev/null
sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt focal-pgdg main" > /etc/apt/sources.list.d/pgdg.list' 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 - wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
apt-get update > /dev/null; apt update > /dev/null;
apt-get -qqy install wget postgresql-client-14 restic > /dev/null; apt -qqy install wget postgresql-client-14 restic > /dev/null;
update-ca-certificates update-ca-certificates