SOURCES: postgresql.init - nicer status output (shows names of DB ...

hawk hawk at pld-linux.org
Tue Apr 4 19:32:40 CEST 2006


Author: hawk                         Date: Tue Apr  4 17:32:40 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- nicer status output (shows names of DB clusters)

---- Files affected:
SOURCES:
   postgresql.init (1.66 -> 1.67) 

---- Diffs:

================================================================
Index: SOURCES/postgresql.init
diff -u SOURCES/postgresql.init:1.66 SOURCES/postgresql.init:1.67
--- SOURCES/postgresql.init:1.66	Sat Jul 23 20:09:26 2005
+++ SOURCES/postgresql.init	Tue Apr  4 19:32:35 2006
@@ -169,8 +169,14 @@
 	;;
   status)
 	for pgdir in $DB_CLUSTERS; do
-	TMPDIR=/tmp su postgres -c "/usr/bin/pg_ctl -D $pgdir status"
-		done
+		pgstatus "$pgdir"
+		echo -n "$pgdir: "
+		if [ "$PG_STATUS" = "running" ]; then
+			echo "$PG_STATUS (PID: $PG_PID)"
+		else
+			echo "$PG_STATUS"
+		fi
+	done
 	;;
   restart)
 	$0 stop "$DB_CLUSTERS"
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/postgresql.init?r1=1.66&r2=1.67&f=u



More information about the pld-cvs-commit mailing list