]> git.pld-linux.org Git - packages/postgresql.git/blobdiff - postgresql.init
Merge branch 'master' of git://git.pld-linux.org/packages/postgresql
[packages/postgresql.git] / postgresql.init
index 7eb935a9f420624a72fa96bb86b6da4f8ea6bf68..1a5f91bdc3a94e7a507c69349c4f041b73930e6f 100644 (file)
@@ -18,6 +18,8 @@ cd /
 # Get network config
 . /etc/sysconfig/network
 
+PG_INIT_LOCALE=C
+
 # Get service config
 if [ -f /etc/sysconfig/postgresql ]; then
        . /etc/sysconfig/postgresql
@@ -90,8 +92,9 @@ pgstatus() {
 # $1 - db cluster
 #
 pgstart() {
+       is_no "$RC_LOGGING" && fork=--fork
        msg_starting "PostgreSQL $1"
-       daemon --user postgres /usr/bin/pg_ctl -s -w -D $1 start
+       daemon $fork --user postgres /usr/bin/pg_ctl -s -w -D $1 start
 }
 
 #
@@ -164,6 +167,9 @@ stop() {
        pgsubsys
 }
 
+
+upstart_controlled --except status init
+
 RETVAL=0
 # See how we were called.
 # Every action is performed for all given (all configured by default)
@@ -245,7 +251,7 @@ case "$action" in
                        mkdir -p $pgdir
                        chmod 700 $pgdir
                        chown postgres:postgres $pgdir
-                       TMPDIR=/tmp su postgres -s /bin/sh -c "initdb -E UNICODE -D $pgdir"
+                       LC_ALL=$PG_INIT_LOCALE TMPDIR=/tmp su postgres -s /bin/sh -c "initdb -E UNICODE -D $pgdir"
                fi
        done
        echo $(nls "REMEMBER to setup password for user \"postgres\"")'!'
This page took 0.072521 seconds and 4 git commands to generate.