]> git.pld-linux.org Git - packages/postgresql.git/blobdiff - postgresql.init
- up to 10.3
[packages/postgresql.git] / postgresql.init
index 1a5f91bdc3a94e7a507c69349c4f041b73930e6f..647f2ec4328af6cab69cf80b305ae8a7c25863b1 100644 (file)
@@ -76,11 +76,11 @@ pgstatus() {
        output=$(LC_ALL=C TMPDIR=/tmp su postgres -c "/usr/bin/pg_ctl -D $1 status")
        status=$?
 
-       if [ $status -eq 1 ]; then
+       if [ $status -eq 3 ]; then
                PG_STATUS="not running"
        elif [ $status -eq 0 ]; then
                PG_STATUS="running"
-        # or maybe grab it from postmaster.pid file?
+       # or maybe grab it from postmaster.pid file?
                PG_PID=$(echo "$output" | awk '/PID: / { match($0, "PID: [0-9]+"); print substr($0,RSTART+5,RLENGTH-5) }')
        fi
 }
@@ -168,18 +168,16 @@ stop() {
 }
 
 
-upstart_controlled --except status init
-
 RETVAL=0
 # See how we were called.
 # Every action is performed for all given (all configured by default)
 # db clusters.
 case "$action" in
   start)
-       start
+       start
        ;;
   stop)
-       stop
+       stop
        ;;
   status)
        for pgdir in $DB_CLUSTERS; do
@@ -251,7 +249,7 @@ case "$action" in
                        mkdir -p $pgdir
                        chmod 700 $pgdir
                        chown postgres:postgres $pgdir
-                       LC_ALL=$PG_INIT_LOCALE 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 --data-checksums -D $pgdir"
                fi
        done
        echo $(nls "REMEMBER to setup password for user \"postgres\"")'!'
This page took 0.046308 seconds and 4 git commands to generate.