Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit97e3a6e

Browse files
committed
Remove inappropriate cd commands, per David Wheeler. Also make
the PATH responsive to the installation prefix, which was the apparentintent of the previous edit, but not well executed.
1 parentbfde21a commit97e3a6e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

‎contrib/start-scripts/osx/PostgreSQL

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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"
8484
StartService () {
8585
if ["${POSTGRESQL:=-NO-}"="-YES-" ];then
8686
ConsoleMessage"Starting PostgreSQL database server"
87-
cd /Users/postgres
8887
if ["${ROTATELOGS}"="1" ];then
8988
sudo -u$PGUSER sh -c"${DAEMON} -D '${PGDATA}' 2>&1 |${LOGUTIL} '${PGLOG}'${ROTATESEC} &"
9089
else
@@ -95,15 +94,13 @@ StartService () {
9594

9695
StopService () {
9796
ConsoleMessage"Stopping PostgreSQL database server"
98-
cd /Users/postgres
9997
sudo -u$PGUSER$PGCTL stop -D"$PGDATA" -s -m fast
10098
}
10199

102100
RestartService () {
103101
if ["${POSTGRESQL:=-NO-}"="-YES-" ];then
104102
ConsoleMessage"Restarting PostgreSQL database server"
105103
# should match StopService:
106-
cd /Users/postgres
107104
sudo -u$PGUSER$PGCTL stop -D"$PGDATA" -s -m fast
108105
# should match StartService:
109106
if ["${ROTATELOGS}"="1" ];then

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp