فهرست منبع

postgresql: init script: wait till server has started

Adds "-w" option to init script to wait till the database server
has fully started and accepts connections before continuing.

Prevents other applications that depend on PostgreSQL from
failing to start, if the database server is not ready yet.
Times out after 60 seconds by default.

Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Floris Bos 10 سال پیش
والد
کامیت
e7d515d00e
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      package/postgresql/S50postgresql

+ 1 - 1
package/postgresql/S50postgresql

@@ -13,7 +13,7 @@ fi
 
 start() {
 	echo -n "Starting postgresql: "
-	su - postgres -c '/usr/bin/pg_ctl start -D /var/lib/pgsql -l logfile'
+	su - postgres -c '/usr/bin/pg_ctl start -w -D /var/lib/pgsql -l logfile'
 	echo "OK"
 }
 stop() {