diff options
author | jlam <jlam> | 2000-12-07 16:56:39 +0000 |
---|---|---|
committer | jlam <jlam> | 2000-12-07 16:56:39 +0000 |
commit | e9e0527c458eaf63c36cb6b07a5ea28426a2bb81 (patch) | |
tree | 5154ab267addbc3f456b9a1b49982e79fd6299c2 /databases/postgresql/files | |
parent | 5041a0b792e99fba13511bd2252d0c5c3fda170b (diff) | |
download | pkgsrc-e9e0527c458eaf63c36cb6b07a5ea28426a2bb81.tar.gz |
PGHOME is a subdir of ${PREFIX}, so pass -b ${PREFIX} to useradd instead
of directly specifying -d ${PGHOME}. Canonicalize usage of PGHOME while
I'm at it. Fixes pkg/11660 by Ben Collver <collver@softhome.net>.
Diffstat (limited to 'databases/postgresql/files')
-rw-r--r-- | databases/postgresql/files/pgsql.sh.tmpl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/databases/postgresql/files/pgsql.sh.tmpl b/databases/postgresql/files/pgsql.sh.tmpl index 17d9a49fb66..dac496d6244 100644 --- a/databases/postgresql/files/pgsql.sh.tmpl +++ b/databases/postgresql/files/pgsql.sh.tmpl @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: pgsql.sh.tmpl,v 1.8 2000/09/21 14:34:56 jlam Exp $ +# $NetBSD: pgsql.sh.tmpl,v 1.9 2000/12/07 16:56:40 jlam Exp $ # FreeBSD Id: pgsql.sh.tmpl,v 1.3 1997/10/05 21:00:49 andreas Exp # # pgsql.sh - postgresql startup file for NetBSD @@ -10,6 +10,7 @@ CMD=${1:-start} USER=@PGUSER@ +PGHOME=@PREFIX@/${USER} if [ -x @PREFIX@/bin/postmaster -a -x @PREFIX@/bin/pg_ctl ] then @@ -18,15 +19,15 @@ then echo -n ' pgsql' su -l ${USER} -c 'exec @PREFIX@/bin/pg_ctl \ -p @PREFIX@/bin/postmaster -o "-S -o -F" start \ - > @PGHOME@/errlog' + > ${PGHOME}/errlog' ;; stop) su -l ${USER} -c 'exec @PREFIX@/bin/pg_ctl stop \ - >> @PGHOME@/errlog' + >> ${PGHOME}/errlog' ;; restart) su -l ${USER} -c 'exec @PREFIX@/bin/pg_ctl restart \ - >> @PGHOME@/errlog' + >> ${PGHOME}/errlog' ;; status) su -l ${USER} -c 'exec @PREFIX@/bin/pg_ctl status' |