mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
- Use USERS and GROUPS
PR: ports/157547 Submitted by: Chris Rees (utisoft@gmail.com) Approved by: tabthorpe (co-mentor)
This commit is contained in:
parent
7d9f73b790
commit
e57590ed66
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=276512
2 changed files with 2 additions and 35 deletions
|
@ -29,6 +29,8 @@ COUCH_LOGDIR?= ${COUCH_VARDIR}/log/couchdb
|
|||
COUCH_LIBDIR?= ${COUCH_VARDIR}/lib/couchdb
|
||||
COUCH_USER?= couchdb
|
||||
|
||||
USERS= ${COUCH_USER}
|
||||
GROUPS= ${USERS}
|
||||
USE_RC_SUBR= couchdb
|
||||
USE_GMAKE= yes
|
||||
USE_AUTOTOOLS= libtool
|
||||
|
@ -54,9 +56,6 @@ post-patch:
|
|||
@${REINPLACE_CMD} -e 's/install-data-am$$//' ${WRKSRC}/Makefile.in
|
||||
.endif
|
||||
|
||||
pre-install:
|
||||
@${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
|
||||
|
||||
post-install:
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
${MKDIR} ${COUCH_DBDIR}
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
PATH=/bin:/usr/sbin
|
||||
|
||||
USER=couchdb
|
||||
GROUP=couchdb
|
||||
UID=919
|
||||
GID=919
|
||||
|
||||
case $2 in
|
||||
PRE-INSTALL)
|
||||
if pw user show "${USER}" 2>/dev/null; then
|
||||
echo "You already have a user \"${USER}\", so I will use it."
|
||||
else
|
||||
if pw groupadd ${GROUP} -g ${GID}
|
||||
then
|
||||
echo "Added group \"${GROUP}\"."
|
||||
else
|
||||
echo "Adding group \"${GROUP}\" failed..."
|
||||
exit 1
|
||||
fi
|
||||
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
|
||||
-s /usr/sbin/nologin -L daemon -d /var/empty -c "CouchDB Account"
|
||||
then
|
||||
echo "Added user \"${USER}\"."
|
||||
else
|
||||
echo "Adding user \"${USER}\" failed..."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
Loading…
Add table
Reference in a new issue