#!/bin/bash if [ "$(id -u)" != "0" ]; then echo -e "\033[31mThis script requires superuser rights.\033[0m" exit 0 fi trap 'echo -e "\033[31minstall.sh: Something went wrong\033[0m"; exit 1' ERR set -e export DEBIAN_FRONTEND=noninteractive echo "Install postgres..." cd /data/utils bash global-env.sh POSTGRES_USER admin bash global-env.sh POSTGRES_DB postgres sudo bash env-gen.sh POSTGRES_PASSWORD cd /data/postgres sudo docker compose up -d trap - ERR echo "Install postgres complete"