Fix my previous commit, use user/group vars properly.
This commit is contained in:
parent
9ad8f9cdfc
commit
56c3bf8157
3 changed files with 11 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
|||
===========================================================================
|
||||
$NetBSD: MESSAGE,v 1.1 2014/04/30 05:39:19 rodent Exp $
|
||||
$NetBSD: MESSAGE,v 1.2 2014/07/15 17:30:26 fhajny Exp $
|
||||
|
||||
If using the rc.d init system, set the following variables in rc.conf:
|
||||
|
||||
|
@ -12,7 +12,7 @@ memcached_jobN_args="-p 1121N -m 64 -c 1024"
|
|||
to start as many memcached instances as desired with the required options.
|
||||
PID files for each instance will be created in:
|
||||
|
||||
${PKG_HOME} named as:
|
||||
${MEMCACHED_HOME} named as:
|
||||
|
||||
${PKGBASE}-job0.pid ... ${PKGBASE}-jobN.pid.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.44 2014/07/15 16:52:34 wiz Exp $
|
||||
# $NetBSD: Makefile,v 1.45 2014/07/15 17:30:26 fhajny Exp $
|
||||
|
||||
DISTNAME= memcached-1.4.20
|
||||
PKGREVISION= 2
|
||||
|
@ -26,18 +26,19 @@ BUILD_DEFS+= VARBASE
|
|||
|
||||
MEMCACHED_USER?= memcached
|
||||
MEMCACHED_GROUP?= memcached
|
||||
MEMCACHED_HOME?= ${VARBASE}/chroot/${PKGBASE}
|
||||
|
||||
PKG_GROUPS= ${MEMCACHED_GROUP}
|
||||
PKG_USERS= ${MEMCACHED_USER}:${MEMCACHED_GROUP}
|
||||
PKG_GROUPS_VARS+= MEMCACHED_GROUP
|
||||
PKG_USERS_VARS+= MEMCACHED_USER
|
||||
PKG_HOME.${MEMCACHED_USER}?= ${VARBASE}/chroot/${PKGBASE}
|
||||
PKG_HOME= ${PKG_HOME.${MEMCACHED_USER}}
|
||||
PKG_HOME.${MEMCACHED_USER}= ${MEMCACHED_HOME}
|
||||
PKG_GECOS.${MEMCACHED_USER}= Memcached
|
||||
|
||||
OWN_DIRS_PERMS+= ${PKG_HOME} ${MEMCACHED_USER} ${MEMCACHED_GROUP} 0700
|
||||
OWN_DIRS_PERMS+= ${MEMCACHED_HOME} ${MEMCACHED_USER} ${MEMCACHED_GROUP} 0700
|
||||
FILES_SUBST+= MEMCACHED_USER=${MEMCACHED_USER}
|
||||
FILES_SUBST+= MEMCACHED_GROUP=${MEMCACHED_GROUP} PKG_HOME=${PKG_HOME}
|
||||
MESSAGE_SUBST+= PKG_HOME=${PKG_HOME}
|
||||
FILES_SUBST+= MEMCACHED_GROUP=${MEMCACHED_GROUP} MEMCACHED_HOME=${MEMCACHED_HOME}
|
||||
MESSAGE_SUBST+= MEMCACHED_HOME=${MEMCACHED_HOME}
|
||||
|
||||
TEST_TARGET= test
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!@RCD_SCRIPTS_SHELL@
|
||||
#
|
||||
# $NetBSD: memcached.sh,v 1.2 2014/04/30 05:39:19 rodent Exp $
|
||||
# $NetBSD: memcached.sh,v 1.3 2014/07/15 17:30:26 fhajny Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: memcached
|
||||
|
@ -15,7 +15,7 @@ command_args="-d"
|
|||
start_cmd="memcached_start"
|
||||
stop_cmd="memcached_stop"
|
||||
status_cmd="memcached_status"
|
||||
pidfile_base="@PKG_HOME@/memcached-"
|
||||
pidfile_base="@MEMCACHED_HOME@/memcached-"
|
||||
|
||||
memcached_pid()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue