From 031e1afa23846c6e26747a8ee99bdece80cb1da3 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 19 Apr 2001 19:17:44 +0000 Subject: Pass -D option to pg_ctl because export PGDATA won't be preserved across 'su -l'. Reported by . --- contrib/start-scripts/linux | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'contrib/start-scripts/linux') diff --git a/contrib/start-scripts/linux b/contrib/start-scripts/linux index 9b0d0737f36..9fd0786434f 100644 --- a/contrib/start-scripts/linux +++ b/contrib/start-scripts/linux @@ -20,7 +20,7 @@ # Original author: Ryan Kirkpatrick -# $Header: /cvsroot/pgsql/contrib/start-scripts/linux,v 1.1 2001/02/08 19:53:33 petere Exp $ +# $Header: /cvsroot/pgsql/contrib/start-scripts/linux,v 1.2 2001/04/19 19:17:44 petere Exp $ ## EDIT FROM HERE @@ -38,8 +38,6 @@ PGLOG="$PGDATA/serverlog" ## STOP EDITING HERE -export PGDATA - # Check for echo -n vs echo \c if echo '\c' | grep -s c >/dev/null 2>&1 ; then ECHO_N="echo -n" @@ -64,21 +62,21 @@ test -f $DAEMON || exit 0 case $1 in start) $ECHO_N "Starting PostgreSQL: "$ECHO_C - su - $PGUSER -c "$DAEMON start -s -l $PGLOG" + su - $PGUSER -c "$DAEMON start -D '$PGDATA' -s -l $PGLOG" echo "ok" ;; stop) echo -n "Stopping PostgreSQL: " - su - $PGUSER -c "$DAEMON stop -s -m fast" + su - $PGUSER -c "$DAEMON stop -D '$PGDATA' -s -m fast" echo "ok" ;; restart) echo -n "Restarting PostgreSQL: " - su - $PGUSER -c "$DAEMON restart -s -m fast" + su - $PGUSER -c "$DAEMON restart -D '$PGDATA' -s -m fast" echo "ok" ;; status) - su - $PGUSER -c "$DAEMON status" + su - $PGUSER -c "$DAEMON status -D '$PGDATA'" ;; *) # Print help -- cgit v1.2.3