Add pg_ctl start after initdb has completed.

This commit is contained in:
FusionPBX 2020-11-16 17:07:34 -07:00 committed by GitHub
parent 101c67aba8
commit ea70a6313c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 6 deletions

View File

@ -64,23 +64,29 @@ echo 'postgresql_enable=true' >> /etc/rc.conf
/usr/local/etc/rc.d/postgresql initdb /usr/local/etc/rc.d/postgresql initdb
#start postgresql #start postgresql
if [ ."$database_version" = ."13" ]; then
sudo -u postgres /usr/local/bin/pg_ctl -D /var/db/postgres/data13 start
fi
if [ ."$database_version" = ."12" ]; then
sudo -u postgres /usr/local/bin/pg_ctl -D /var/db/postgres/data12 start
fi
if [ ."$database_version" = ."11" ]; then if [ ."$database_version" = ."11" ]; then
sudo -u postgres /usr/local/bin/pg_ctl -D /var/db/postgres/data11 -l logfile start sudo -u postgres /usr/local/bin/pg_ctl -D /var/db/postgres/data11 start
fi fi
if [ ."$database_version" = ."10" ]; then if [ ."$database_version" = ."10" ]; then
sudo -u postgres /usr/local/bin/pg_ctl -D /var/db/postgres/data10 -l logfile start sudo -u postgres /usr/local/bin/pg_ctl -D /var/db/postgres/data10 start
fi fi
if [ ."$database_version" = ."9.6" ]; then if [ ."$database_version" = ."9.6" ]; then
sudo -u postgres /usr/local/bin/pg_ctl -D /var/db/postgres/data96 -l logfile start sudo -u postgres /usr/local/bin/pg_ctl -D /var/db/postgres/data96 start
fi fi
if [ ."$database_version" = ."9.5" ]; then if [ ."$database_version" = ."9.5" ]; then
sudo -u postgres /usr/local/bin/pg_ctl -D /var/db/postgres/data95 -l logfile start sudo -u postgres /usr/local/bin/pg_ctl -D /var/db/postgres/data95 start
fi fi
if [ ."$database_version" = ."9.4" ]; then if [ ."$database_version" = ."9.4" ]; then
sudo -u postgres /usr/local/bin/pg_ctl -D /var/db/postgres/data94 -l logfile start sudo -u postgres /usr/local/bin/pg_ctl -D /var/db/postgres/data94 start
fi fi
if [ ."$database_version" = ."9.3" ]; then if [ ."$database_version" = ."9.3" ]; then
sudo -u pgsql /usr/local/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start sudo -u pgsql /usr/local/bin/pg_ctl -D /usr/local/pgsql/data start
fi fi
#restart the service #restart the service