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 6
6
# Created through merger of the Linux start script by Ryan Kirkpatrick
7
7
# and the script in the FreeBSD ports collection.
8
8
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 $
10
10
11
11
# # EDIT FROM HERE
12
12
@@ -24,8 +24,6 @@ PGLOG="$PGDATA/serverlog"
24
24
25
25
# # STOP EDITING HERE
26
26
27
- export PGDATA
28
-
29
27
# The path that is to be used for the script
30
28
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
31
29
@@ -36,17 +34,17 @@ test -x "$DAEMON" || exit 0
36
34
37
35
case $1 in
38
36
start)
39
- su -l $PGUSER -c " $DAEMON start -s -l $PGLOG "
37
+ su -l $PGUSER -c " $DAEMON start -D ' $PGDATA ' - s -l $PGLOG "
40
38
echo -n ' postgresql'
41
39
;;
42
40
stop)
43
- su -l $PGUSER -c " $DAEMON stop -s -m fast"
41
+ su -l $PGUSER -c " $DAEMON stop -D ' $PGDATA ' - s -m fast"
44
42
;;
45
43
restart)
46
- su -l $PGUSER -c " $DAEMON restart -s -m fast"
44
+ su -l $PGUSER -c " $DAEMON restart -D ' $PGDATA ' - s -m fast"
47
45
;;
48
46
status)
49
- su -l $PGUSER -c " $DAEMON status"
47
+ su -l $PGUSER -c " $DAEMON status -D ' $PGDATA ' "
50
48
;;
51
49
* )
52
50
# Print help
Original file line number Diff line number Diff line change 20
20
21
21
# Original author: Ryan Kirkpatrick <pgsql@rkirkpat.net>
22
22
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 $
24
24
25
25
# # EDIT FROM HERE
26
26
@@ -38,8 +38,6 @@ PGLOG="$PGDATA/serverlog"
38
38
39
39
# # STOP EDITING HERE
40
40
41
- export PGDATA
42
-
43
41
# Check for echo -n vs echo \c
44
42
if echo ' \c' | grep -s c > /dev/null 2>&1 ; then
45
43
ECHO_N=" echo -n"
@@ -64,21 +62,21 @@ test -f $DAEMON || exit 0
64
62
case $1 in
65
63
start)
66
64
$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 "
68
66
echo " ok"
69
67
;;
70
68
stop)
71
69
echo -n " Stopping PostgreSQL: "
72
- su - $PGUSER -c " $DAEMON stop -s -m fast"
70
+ su - $PGUSER -c " $DAEMON stop -D ' $PGDATA ' - s -m fast"
73
71
echo " ok"
74
72
;;
75
73
restart)
76
74
echo -n " Restarting PostgreSQL: "
77
- su - $PGUSER -c " $DAEMON restart -s -m fast"
75
+ su - $PGUSER -c " $DAEMON restart -D ' $PGDATA ' - s -m fast"
78
76
echo " ok"
79
77
;;
80
78
status)
81
- su - $PGUSER -c " $DAEMON status"
79
+ su - $PGUSER -c " $DAEMON status -D ' $PGDATA ' "
82
80
;;
83
81
* )
84
82
# Print help
You can’t perform that action at this time.
0 commit comments