Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
jburel committed Aug 25, 2023
1 parent cb458ad commit 943475b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions linux/step01_rocky9_pg_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
# pg 13 is installed by default
yum -y install postgresql-server postgresql

if [ "${container:-}" = docker ]; then
#if [ "${container:-}" = docker ]; then
su - postgres -c "/usr/bin/initdb -D /var/lib/pgsql/data --encoding=UTF8"
echo "listen_addresses='*'" >> /var/lib/pgsql/data/postgresql.conf
else
PGSETUP_INITDB_OPTIONS=--encoding=UTF8 /usr/bin/postgresql-setup --initdb
fi
#else
# PGSETUP_INITDB_OPTIONS=--encoding=UTF8 /usr/bin/postgresql-setup --initdb
#fi
sed -i.bak -re 's/^(host.*)ident/\1md5/' /var/lib/pgsql/data/pg_hba.conf

if [ "${container:-}" = docker ]; then
#if [ "${container:-}" = docker ]; then
su - postgres -c "/usr/bin/pg_ctl start -D /var/lib/pgsql/data -w"
else
systemctl start postgresql
fi
#else
# systemctl start postgresql
#fi
systemctl enable postgresql

sed -i 's/ ident/ trust/g' /var/lib/pgsql/data/pg_hba.conf

0 comments on commit 943475b

Please sign in to comment.