]> git.pld-linux.org Git - packages/postgresql.git/commitdiff
- sanity
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 30 Oct 2006 16:40:44 +0000 (16:40 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- head -n syntax

Changed files:
    postgresql.init -> 1.71

postgresql.init

index 3aa428b0c5a27d06671a53e8b1a29ab3fb04049b..d1184c98c0e3a939c4dea89e252998245f640dd3 100644 (file)
@@ -71,15 +71,15 @@ fi
 pgstatus() {
        PG_STATUS="unknown"
        PG_PID="unknown"
-       output=`LC_ALL=C TMPDIR=/tmp su postgres -c "/usr/bin/pg_ctl -D $1 status"`
-       status=`echo $?`
+       output=$(LC_ALL=C TMPDIR=/tmp su postgres -c "/usr/bin/pg_ctl -D $1 status")
+       status=$?
 
        if [ $status -eq 1 ]; then
                PG_STATUS="not running"
        elif [ $status -eq 0 ]; then
                PG_STATUS="running"
         # or maybe grab it from postmaster.pid file?
-               PG_PID=`echo "$output" | sed 's/^pg_ctl:.*PID: \([0-9]\+\).*/\1/' | head -1`
+               PG_PID=`echo "$output" | sed 's/^pg_ctl:.*PID: \([0-9]\+\).*/\1/' | head -1`
        fi
 }
 
This page took 0.200522 seconds and 4 git commands to generate.