File tree Expand file tree Collapse file tree 2 files changed +10
-14
lines changed
Expand file tree Collapse file tree 2 files changed +10
-14
lines changed Original file line number Diff line number Diff line change 66# Created through merger of the Linux start script by Ryan Kirkpatrick
77# and the script in the FreeBSD ports collection.
88
9- # $Header: /cvsroot/pgsql/contrib/start-scripts/freebsd,v 1.1 2001/02/10 00:13:23 petere Exp $
9+ # $Header: /cvsroot/pgsql/contrib/start-scripts/freebsd,v 1.2 2001/04/19 19:17:44 petere Exp $
1010
1111# # EDIT FROM HERE
1212
@@ -24,8 +24,6 @@ PGLOG="$PGDATA/serverlog"
2424
2525# # STOP EDITING HERE
2626
27- export PGDATA
28-
2927# The path that is to be used for the script
3028PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
3129
@@ -36,17 +34,17 @@ test -x "$DAEMON" || exit 0
3634
3735case $1 in
3836 start)
39- su -l $PGUSER -c " $DAEMON start -s -l $PGLOG "
37+ su -l $PGUSER -c " $DAEMON start -D ' $PGDATA ' - s -l $PGLOG "
4038 echo -n ' postgresql'
4139 ;;
4240 stop)
43- su -l $PGUSER -c " $DAEMON stop -s -m fast"
41+ su -l $PGUSER -c " $DAEMON stop -D ' $PGDATA ' - s -m fast"
4442 ;;
4543 restart)
46- su -l $PGUSER -c " $DAEMON restart -s -m fast"
44+ su -l $PGUSER -c " $DAEMON restart -D ' $PGDATA ' - s -m fast"
4745 ;;
4846 status)
49- su -l $PGUSER -c " $DAEMON status"
47+ su -l $PGUSER -c " $DAEMON status -D ' $PGDATA ' "
5048 ;;
5149 * )
5250 # Print help
Original file line number Diff line number Diff line change 2020
2121# Original author: Ryan Kirkpatrick <pgsql@rkirkpat.net>
2222
23- # $Header: /cvsroot/pgsql/contrib/start-scripts/linux,v 1.1 2001/02/08 19:53:33 petere Exp $
23+ # $Header: /cvsroot/pgsql/contrib/start-scripts/linux,v 1.2 2001/04/19 19:17:44 petere Exp $
2424
2525# # EDIT FROM HERE
2626
@@ -38,8 +38,6 @@ PGLOG="$PGDATA/serverlog"
3838
3939# # STOP EDITING HERE
4040
41- export PGDATA
42-
4341# Check for echo -n vs echo \c
4442if echo ' \c' | grep -s c > /dev/null 2>&1 ; then
4543 ECHO_N=" echo -n"
@@ -64,21 +62,21 @@ test -f $DAEMON || exit 0
6462case $1 in
6563 start)
6664 $ECHO_N " Starting PostgreSQL: " $ECHO_C
67- su - $PGUSER -c " $DAEMON start -s -l $PGLOG "
65+ su - $PGUSER -c " $DAEMON start -D ' $PGDATA ' - s -l $PGLOG "
6866 echo " ok"
6967 ;;
7068 stop)
7169 echo -n " Stopping PostgreSQL: "
72- su - $PGUSER -c " $DAEMON stop -s -m fast"
70+ su - $PGUSER -c " $DAEMON stop -D ' $PGDATA ' - s -m fast"
7371 echo " ok"
7472 ;;
7573 restart)
7674 echo -n " Restarting PostgreSQL: "
77- su - $PGUSER -c " $DAEMON restart -s -m fast"
75+ su - $PGUSER -c " $DAEMON restart -D ' $PGDATA ' - s -m fast"
7876 echo " ok"
7977 ;;
8078 status)
81- su - $PGUSER -c " $DAEMON status"
79+ su - $PGUSER -c " $DAEMON status -D ' $PGDATA ' "
8280 ;;
8381 * )
8482 # Print help
You can’t perform that action at this time.
0 commit comments