summaryrefslogtreecommitdiff
path: root/databases/postgresql-server
diff options
context:
space:
mode:
authorcjs <cjs@pkgsrc.org>2002-07-18 01:40:07 +0000
committercjs <cjs@pkgsrc.org>2002-07-18 01:40:07 +0000
commit37230c83e70504732780d2c1ba3f9411c6b865ef (patch)
tree3470939ac548c24a344b25e118d06d3f7c0ab973 /databases/postgresql-server
parent0a85289c68522e57146f37569535bb15e2f53c50 (diff)
downloadpkgsrc-37230c83e70504732780d2c1ba3f9411c6b865ef.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"