@@ -66,7 +66,7 @@ ROTATESEC="604800"
6666# ###############################################################################
6767
6868# The path that is to be used for the script
69- PATH=/usr/local/pgsql/ bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
69+ PATH=" $prefix / bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
7070
7171# What to use to start up the postmaster (we do NOT use pg_ctl for this,
7272# as it adds no value and can cause the postmaster to misrecognize a stale
@@ -84,7 +84,6 @@ LOGUTIL="/usr/sbin/rotatelogs"
8484StartService () {
8585if [" ${POSTGRESQL:= -NO-} " = " -YES-" ]; then
8686 ConsoleMessage" Starting PostgreSQL database server"
87- cd /Users/postgres
8887if [" ${ROTATELOGS} " = " 1" ]; then
8988 sudo -u$PGUSER sh -c" ${DAEMON} -D '${PGDATA} ' 2>&1 |${LOGUTIL} '${PGLOG} '${ROTATESEC} &"
9089else
@@ -95,15 +94,13 @@ StartService () {
9594
9695StopService () {
9796 ConsoleMessage" Stopping PostgreSQL database server"
98- cd /Users/postgres
9997 sudo -u$PGUSER $PGCTL stop -D" $PGDATA " -s -m fast
10098}
10199
102100RestartService () {
103101if [" ${POSTGRESQL:= -NO-} " = " -YES-" ]; then
104102 ConsoleMessage" Restarting PostgreSQL database server"
105103# should match StopService:
106- cd /Users/postgres
107104sudo -u$PGUSER $PGCTL stop -D" $PGDATA " -s -m fast
108105# should match StartService:
109106if [" ${ROTATELOGS} " = " 1" ]; then