aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTatsuo Ishii <ishii@postgresql.org>1999-12-06 08:35:34 +0000
committerTatsuo Ishii <ishii@postgresql.org>1999-12-06 08:35:34 +0000
commit8231a7ab2052810ed92914c81e198337a94e0e4f (patch)
tree99c54374de65b2a53885322f29baf38b8d3ce59e /src
parent5b912b089c60022166f6974ff2ecedc12d390a62 (diff)
downloadpostgresql-8231a7ab2052810ed92914c81e198337a94e0e4f.tar.gz
postgresql-8231a7ab2052810ed92914c81e198337a94e0e4f.zip
Fix minor bugs
Diffstat (limited to 'src')
-rwxr-xr-xsrc/bin/pg_ctl/pg_ctl.sh21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/bin/pg_ctl/pg_ctl.sh b/src/bin/pg_ctl/pg_ctl.sh
index 673e5a2b3ac..c97867810db 100755
--- a/src/bin/pg_ctl/pg_ctl.sh
+++ b/src/bin/pg_ctl/pg_ctl.sh
@@ -8,7 +8,7 @@
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/pg_ctl/Attic/pg_ctl.sh,v 1.1 1999/12/06 07:23:41 ishii Exp $
+# $Header: /cvsroot/pgsql/src/bin/pg_ctl/Attic/pg_ctl.sh,v 1.2 1999/12/06 08:35:34 ishii Exp $
#
#-------------------------------------------------------------------------
CMDNAME=`basename $0`
@@ -131,6 +131,8 @@ if [ $op = "stop" -o $op = "restart" ];then
echo "done."
fi
+ echo "postmaster successfully shut down."
+
else
echo "$CMDNAME: Can't find $PIDFILE."
echo "Is postmaster running?"
@@ -148,12 +150,19 @@ if [ $op = "start" -o $op = "restart" ];then
pid=`cat $PIDFILE`
fi
+ # no -o given
if [ -z "$POSTOPTS" ];then
- if [ -f $DEFPOSTOPTS ];then
- eval `cat $DEFPOSTOPTS` &
+ if [ $op = "start" ];then
+ # if we are in start mode, then look postmaster.opts.default
+ if [ -f $DEFPOSTOPTS ];then
+ eval `cat $DEFPOSTOPTS` &
+ else
+ echo "$CMDNAME: Can't find $DEFPOSTOPTS"
+ exit 1
+ fi
else
- echo "$CMDNAME: Can't find $DEFPOSTOPTS"
- exit 1
+ # if we are in restart mode, then look postmaster.opts
+ eval `cat $POSTOPTSFILE` &
fi
else
$po_path $POSTOPTS &
@@ -186,6 +195,8 @@ if [ $op = "start" -o $op = "restart" ];then
done
echo "done."
fi
+
+ echo "postmaster successfully started up."
fi
exit 0