2024-03-06 09:31:40 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -exo pipefail
|
|
|
|
|
2024-03-26 13:04:06 +00:00
|
|
|
function babashka_install() {
|
|
|
|
babashka_version="1.3.189"
|
|
|
|
curl -SsLo /tmp/babashka-${babashka_version}-linux-amd64.tar.gz https://github.com/babashka/babashka/releases/download/v${babashka_version}/babashka-${babashka_version}-linux-amd64.tar.gz
|
|
|
|
curl -SsLo /tmp/checksum https://github.com/babashka/babashka/releases/download/v${babashka_version}/babashka-${babashka_version}-linux-amd64.tar.gz.sha256
|
|
|
|
echo " /tmp/babashka-$babashka_version-linux-amd64.tar.gz"|tee -a /tmp/checksum
|
|
|
|
sha256sum -c --status /tmp/checksum
|
2024-03-26 15:38:12 +00:00
|
|
|
tar -C /tmp -xzf /tmp/babashka-${babashka_version}-linux-amd64.tar.gz
|
|
|
|
install -m 0700 -o root -g root /tmp/bb /usr/local/bin/
|
2024-03-26 13:04:06 +00:00
|
|
|
}
|
|
|
|
|
2024-03-06 09:31:40 +00:00
|
|
|
function main() {
|
|
|
|
{
|
|
|
|
upgradeSystem
|
2024-03-15 14:34:56 +00:00
|
|
|
apt-get install -qqy ca-certificates curl gnupg postgresql-client-14 restic
|
2024-03-06 09:31:40 +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'
|
|
|
|
upgradeSystem
|
2024-03-26 13:04:06 +00:00
|
|
|
babashka_install
|
2024-03-06 09:31:40 +00:00
|
|
|
} > /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/
|
2024-04-17 09:36:24 +00:00
|
|
|
install -m 0740 /tmp/restic_management.clj /usr/local/bin/
|
2024-03-06 09:31:40 +00:00
|
|
|
|
|
|
|
cleanupDocker
|
|
|
|
}
|
|
|
|
|
|
|
|
source /tmp/install_functions_debian.sh
|
|
|
|
DEBIAN_FRONTEND=noninteractive DEBCONF_NOWARNINGS=yes main
|