format: shfmt

This commit is contained in:
2025-12-16 15:02:42 +01:00
parent 4587609e17
commit aa7e259ed0

View File

@@ -2,21 +2,21 @@
# helper script to setup a postgres database on deb based systems # helper script to setup a postgres database on deb based systems
if [ "$EUID" -ne 0 ]; then if [ "$EUID" -ne 0 ]; then
echo "Please run as root" echo "Please run as root"
exit 1 exit 1
fi fi
read -s "Do you want to install PostgreSQL 18? [y/N] " INSTALL_PG read -s "Do you want to install PostgreSQL 18? [y/N] " INSTALL_PG
if [ "$INSTALL_PG" != "y" ]; then if [ "$INSTALL_PG" != "y" ]; then
echo "PostgreSQL 18 will not be installed" echo "PostgreSQL 18 will not be installed"
exit 0 exit 0
fi fi
read -s -p "Enter password for PostgreSQL user 'goyco': " GOYCO_PWD read -s -p "Enter password for PostgreSQL user 'goyco': " GOYCO_PWD
echo echo
apt-get update apt-get update
apt-get install -y postgresql-18 apt-get install -y postgresql-18
systemctl enable --now postgresql systemctl enable --now postgresql
@@ -44,5 +44,3 @@ GRANT ALL PRIVILEGES ON DATABASE goyco TO goyco;
EOF EOF
echo "PostgreSQL 18 installed, database 'goyco' and user 'goyco' set up." echo "PostgreSQL 18 installed, database 'goyco' and user 'goyco' set up."