]> git.pld-linux.org Git - packages/postgresql.git/commitdiff
- reverted: issue already resolved, "su -" could cause unwanted importing of profiles...
authorJakub Bogusz <qboosh@pld-linux.org>
Thu, 17 Feb 2005 12:05:56 +0000 (12:05 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    postgresql.init -> 1.63

postgresql.init

index 7ad108e4a102a107279c96fb3ee2114a88faba35..9b77122e585b38642a2d5266ac0896775e739b76 100644 (file)
@@ -71,7 +71,7 @@ fi
 pgstatus() {
        PG_STATUS="unknown"
        PG_PID="unknown"
-       output=`TMPDIR=/tmp su postgres -c "/usr/bin/pg_ctl -D $1 status"`
+       output=`TMPDIR=/tmp su postgres -c "/usr/bin/pg_ctl -D $1 status"`
        status=`echo $?`
 
        if [ $status -eq 1 ]; then
@@ -92,7 +92,7 @@ pgstatus() {
 pgstart() {
        msg_starting "PostgreSQL $1"
        busy
-       TMPDIR=/tmp su postgres -c "/usr/bin/pg_ctl -w -D $1 start 2>&1 >/dev/null"
+       TMPDIR=/tmp su postgres -c "/usr/bin/pg_ctl -w -D $1 start 2>&1 >/dev/null"
        sleep 1
        pgstatus "$1"
 
@@ -159,7 +159,7 @@ case "$action" in
                        busy
                                # is postgresql really alive?
                        if ps ax | grep -v grep | grep -q "$PG_PID"; then
-                               TMPDIR=/tmp su postgres -c "/usr/bin/pg_ctl -w -D $pgdir stop -m fast 2>&1 >/dev/null"
+                               TMPDIR=/tmp su postgres -c "/usr/bin/pg_ctl -w -D $pgdir stop -m fast 2>&1 >/dev/null"
                                pgstatus "$pgdir"
                                if [ "$PG_STATUS" != "not running" ]; then
                                        fail
@@ -178,7 +178,7 @@ case "$action" in
        ;;
   status)
        for pgdir in $DB_CLUSTERS; do
-       TMPDIR=/tmp su postgres -c "/usr/bin/pg_ctl -D $pgdir status"
+       TMPDIR=/tmp su postgres -c "/usr/bin/pg_ctl -D $pgdir status"
                done
        ;;
   restart)
@@ -195,7 +195,7 @@ case "$action" in
                        busy
                        # is postgresql really alive?
                        if ps ax | grep -v grep | grep -q "$PG_PID"; then
-                               TMPDIR=/tmp su postgres -c "/usr/bin/pg_ctl -D $pgdir restart 2>&1 >/dev/null"
+                               TMPDIR=/tmp su postgres -c "/usr/bin/pg_ctl -D $pgdir restart 2>&1 >/dev/null"
                                        pgstatus "$pgdir"
                                if [ "$PG_STATUS" = "running" ]; then
                                        ok
@@ -225,7 +225,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"
+                       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.088049 seconds and 4 git commands to generate.