88#
99#
1010# IDENTIFICATION
11- # $Header: /cvsroot/pgsql/src/bin/pg_ctl/Attic/pg_ctl.sh,v 1.1 1999/12/0607:23:41 ishii Exp $
11+ # $Header: /cvsroot/pgsql/src/bin/pg_ctl/Attic/pg_ctl.sh,v 1.2 1999/12/0608:35:34 ishii Exp $
1212#
1313# -------------------------------------------------------------------------
1414CMDNAME=` basename$0 `
@@ -131,6 +131,8 @@ if [ $op = "stop" -o $op = "restart" ];then
131131echo " done."
132132fi
133133
134+ echo " postmaster successfully shut down."
135+
134136else
135137echo " $CMDNAME : Can't find$PIDFILE ."
136138echo " Is postmaster running?"
@@ -148,12 +150,19 @@ if [ $op = "start" -o $op = "restart" ];then
148150pid=` cat$PIDFILE `
149151fi
150152
153+ # no -o given
151154if [-z " $POSTOPTS " ]; then
152- if [-f $DEFPOSTOPTS ]; then
153- eval ` cat$DEFPOSTOPTS ` &
155+ if [$op = " start" ]; then
156+ # if we are in start mode, then look postmaster.opts.default
157+ if [-f $DEFPOSTOPTS ]; then
158+ eval ` cat$DEFPOSTOPTS ` &
159+ else
160+ echo " $CMDNAME : Can't find$DEFPOSTOPTS "
161+ exit 1
162+ fi
154163else
155- echo " $CMDNAME : Can't find $DEFPOSTOPTS "
156- exit 1
164+ # if we are in restart mode, then look postmaster.opts
165+ eval ` cat $POSTOPTSFILE ` &
157166fi
158167else
159168$po_path $POSTOPTS &
@@ -186,6 +195,8 @@ if [ $op = "start" -o $op = "restart" ];then
186195done
187196echo " done."
188197fi
198+
199+ echo " postmaster successfully started up."
189200fi
190201
191202exit 0