had to manually fix postgresql script

This commit is contained in:
tomit4 2022-04-27 12:42:52 -07:00
parent 75f1af5058
commit 0dcce2ac18

View file

@ -8,13 +8,19 @@ if [ "$PGROOT" != "/var/lib/postgres" ]; then
ln -sf "$PGROOT" /var/lib/postgres
fi
if [ ! -d "/var/run/postgresql" ]; then
echo "creating directory /var/run/postgresql"
mkdir -p "/var/run/postgresql"
chown -R postgres:postgres "/var/run/postgresql"
fi
if [ ! -d "$PGDATA" ]; then
echo "Initializing database in $PGDATA"
mkdir -p "$PGDATA"
mkdir -p "$PGDATA"
chown -R postgres:postgres "$PGDATA"
chmod 777 "$PGDATA"
chmod 0700 "$PGDATA"
su - postgres -m -c "/usr/bin/initdb $INITOPTS -D '$PGDATA'" >/dev/null
if [ -f /etc/postgresql/postgresql.conf ]; then