diff options
author | Tom Lane | 2008-01-16 21:00:25 +0000 |
---|---|---|
committer | Tom Lane | 2008-01-16 21:00:25 +0000 |
commit | 97e3a6e9c5468c82c4e0846209facc65813bc506 (patch) | |
tree | f454c4716218d402c53b8cf42fd1a79ed6571664 /contrib/start-scripts/osx | |
parent | bfde21a1a8de2f425fbab776d5cd97d2ace2df30 (diff) |
Remove inappropriate cd commands, per David Wheeler. Also make
the PATH responsive to the installation prefix, which was the apparent
intent of the previous edit, but not well executed.
Diffstat (limited to 'contrib/start-scripts/osx')
-rwxr-xr-x | contrib/start-scripts/osx/PostgreSQL | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/contrib/start-scripts/osx/PostgreSQL b/contrib/start-scripts/osx/PostgreSQL index 09f5ca39f53..dc826837a32 100755 --- a/contrib/start-scripts/osx/PostgreSQL +++ b/contrib/start-scripts/osx/PostgreSQL @@ -66,7 +66,7 @@ ROTATESEC="604800" ################################################################################ # The path that is to be used for the script -PATH=/usr/local/pgsql/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +PATH="$prefix/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" # What to use to start up the postmaster (we do NOT use pg_ctl for this, # as it adds no value and can cause the postmaster to misrecognize a stale @@ -84,7 +84,6 @@ LOGUTIL="/usr/sbin/rotatelogs" StartService () { if [ "${POSTGRESQL:=-NO-}" = "-YES-" ]; then ConsoleMessage "Starting PostgreSQL database server" - cd /Users/postgres if [ "${ROTATELOGS}" = "1" ]; then sudo -u $PGUSER sh -c "${DAEMON} -D '${PGDATA}' 2>&1 | ${LOGUTIL} '${PGLOG}' ${ROTATESEC} &" else @@ -95,7 +94,6 @@ StartService () { StopService () { ConsoleMessage "Stopping PostgreSQL database server" - cd /Users/postgres sudo -u $PGUSER $PGCTL stop -D "$PGDATA" -s -m fast } @@ -103,7 +101,6 @@ RestartService () { if [ "${POSTGRESQL:=-NO-}" = "-YES-" ]; then ConsoleMessage "Restarting PostgreSQL database server" # should match StopService: - cd /Users/postgres sudo -u $PGUSER $PGCTL stop -D "$PGDATA" -s -m fast # should match StartService: if [ "${ROTATELOGS}" = "1" ]; then |