summaryrefslogtreecommitdiff
path: root/databases/postgresql84-server/files
diff options
context:
space:
mode:
authorChris Rees <crees@FreeBSD.org>2011-08-12 09:55:23 +0000
committerChris Rees <crees@FreeBSD.org>2011-08-12 09:55:23 +0000
commit5ceaa42ffaaffd566a2e1d04c473fdd66209ccee (patch)
treecb191ec6cc1ec4d08bf7f8081582b32f4bf1595a /databases/postgresql84-server/files
parentUse USERS and GROUPS (diff)
Use USERS and GROUPS
PR: ports/157666 Submitted by: me Approved by: maintainer timeout (girgen, 8 weeks)
Notes
Notes: svn path=/head/; revision=279538
Diffstat (limited to 'databases/postgresql84-server/files')
-rw-r--r--databases/postgresql84-server/files/pkg-install-server.in37
1 files changed, 0 insertions, 37 deletions
diff --git a/databases/postgresql84-server/files/pkg-install-server.in b/databases/postgresql84-server/files/pkg-install-server.in
index da85c73b7e4c..e3be291efdc1 100644
--- a/databases/postgresql84-server/files/pkg-install-server.in
+++ b/databases/postgresql84-server/files/pkg-install-server.in
@@ -4,10 +4,6 @@
PATH=/bin:/usr/bin:/usr/sbin
-PG_USER=%%PG_USER%%
-PG_GROUP=%%PG_GROUP%%
-PG_UID=%%PG_UID%%
-
backupwarning() { echo "
=========== BACKUP YOUR DATA! =============
@@ -24,39 +20,6 @@ backupwarning() { echo "
}
case $2 in
-PRE-INSTALL)
- backupwarning
- DB_DIR=${PKG_PREFIX}/${PG_USER}
-
- if pw group show "${PG_GROUP}" 2>/dev/null; then
- echo "You already have a group \"${PG_GROUP}\", so I will use it."
- else
- if pw groupadd ${PG_GROUP} -g ${PG_UID}; then
- echo "Added group \"${PG_GROUP}\"."
- else
- echo "Adding group \"${PG_GROUP}\" failed..."
- exit 1
- fi
- fi
-
- if pw user show "${PG_USER}" 2>/dev/null; then
- echo "You already have a user \"${PG_USER}\", so I will use it."
- else
- if pw useradd ${PG_USER} -u ${PG_UID} -g ${PG_GROUP} -h - \
- -d ${DB_DIR} -c "PostgreSQL Daemon"
- then
- echo "Added user \"${PG_USER}\"."
- else
- echo "Adding user \"${PG_USER}\" failed..."
- exit 1
- fi
- fi
-
- if ! [ -x ~${PG_USER} ] ; then
- install -m 755 -o ${PG_USER} -g ${PG_GROUP} -d ${DB_DIR}
- fi
- ;;
-
BACKUPWARNING)
backupwarning
;;