1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00

- Don't need to set PLIST_DIRS it's included automatically, this fixes

an uninstall warning
- Don't echo about installing docs, just do it
- Include cvs ID tag in rc script
- Get the right keywords in the rc script
- Use SIGKILL in rc script due to upstream bug
- Simplify rc script by using sig_stop variable
- Don't set pidfile redundantly in rc script
- Clean up flag handling in rc script
- These should all have been done pre-commit, thanks to dougb@ for review

Pointy hat to:		swills
This commit is contained in:
Steve Wills 2011-07-17 01:20:08 +00:00
parent ed94faf651
commit 4ad7273111
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=277824
2 changed files with 13 additions and 15 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= memcacheq
PORTVERSION= 0.2.0
PORTREVISION= 1
CATEGORIES= databases
MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} \
${MASTER_SITE_GENTOO}
@ -27,7 +28,6 @@ GNU_CONFIGURE= YES
CONFIGURE_ARGS= --with-libevent=${LOCALBASE} --with-bdb=${LOCALBASE} --enable-threads
PLIST_FILES= bin/memcacheq
PLIST_DIRS= ${DOCSDIR_REL}
PORTDOCS= README
MCQDIR?= /var/db/memcacheq
@ -36,7 +36,6 @@ MCQDIR?= /var/db/memcacheq
post-install:
.if !defined(NOPORTDOCS)
@${ECHO_MSG} "===> Installing documentation for ${PKGNAME}"
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
.endif

View File

@ -1,14 +1,19 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: memcacheq
# REQUIRE: DAEMON
#
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to run memcacheq:
#
# memcacheq_enable (bool): Set it to "YES" to enable memcacheq.
# Default is "NO".
# memcacheq_flags (flags): Set extra flags here.
# Default is empty "".
# Default is "-N -H /var/db/memcacheq -R -L 1024 -B 1024"
# memcacheq_user (user): Set user to run memcacheq.
# Default is "nobody".
#
@ -17,23 +22,17 @@
name="memcacheq"
rcvar=${name}_enable
sig_stop=KILL
load_rc_config ${name}
: ${memcacheq_enable="NO"}
: ${memcacheq_user="nobody"}
: ${memcacheq_pidfile="/var/db/memcacheq/memcacheq.pid"}
: ${memcacheq_flags="-N -H /var/db/memcacheq -R -L 1024 -B 1024"}
stop_postcmd()
{
sleep 3
kill -9 `cat ${pidfile}`
}
start_precmd="install -d -o $memcacheq_user -g wheel -m 700 /var/run/${name}"
pidfile=${memcacheq_pidfile}
command=%%PREFIX%%/bin/memcacheq
command_args="-d -N -H /var/db/memcacheq -R -L 1024 -B 1024 -u ${memcacheq_user} -P ${pidfile}"
stop_postcmd="stop_postcmd"
command_args="-u ${memcacheq_user} -P /var/run/${name}/${name}.pid -d"
run_rc_command "$1"