summaryrefslogtreecommitdiff
path: root/databases/postgresql-server
diff options
context:
space:
mode:
authorcjs <cjs>2002-07-18 01:40:07 +0000
committercjs <cjs>2002-07-18 01:40:07 +0000
commite715529a0ae85f47dcefe979179571e8417ec7ee (patch)
tree3470939ac548c24a344b25e118d06d3f7c0ab973 /databases/postgresql-server
parent3f74607b481f3850c59f268098c0adad881793ea (diff)
downloadpkgsrc-e715529a0ae85f47dcefe979179571e8417ec7ee.tar.gz
Don't hard-code PGHOME; get it from the passwd file.
Diffstat (limited to 'databases/postgresql-server')
-rw-r--r--databases/postgresql-server/files/pgsql.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/databases/postgresql-server/files/pgsql.sh b/databases/postgresql-server/files/pgsql.sh
index 3b5e633e6ef..f3b3c5c64f7 100644
--- a/databases/postgresql-server/files/pgsql.sh
+++ b/databases/postgresql-server/files/pgsql.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: pgsql.sh,v 1.9 2002/04/05 16:23:23 jlam Exp $
+# $NetBSD: pgsql.sh,v 1.10 2002/07/18 01:40:07 cjs Exp $
#
# PostgreSQL database rc.d control script
#
@@ -17,8 +17,6 @@
# "pgsql_flags" contains options for the PostgreSQL postmaster. See
# postmaster(1) for possible options.
-PGHOME="@PGHOME@"
-
if [ -f /etc/rc.subr ]
then
. /etc/rc.subr
@@ -29,6 +27,8 @@ rcd_dir=`@DIRNAME@ $0`
name="pgsql"
rcvar=$name
pgsql_user="@PGUSER@"
+eval PGHOME="~$pgsql_user"
+
command="@PREFIX@/bin/postmaster"
ctl_command="@PREFIX@/bin/pg_ctl"
pidfile="${PGHOME}/data/postmaster.pid"