1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-05 01:55:52 +00:00
freebsd-ports/databases/memcacheq/files/memcacheq.in
Doug Barton 83eb2c3700 In the rc.d scripts, change assignments to rcvar to use the
literal name_enable wherever possible, and ${name}_enable
when it's not, to prepare for the demise of set_rcvar().

In cases where I had to hand-edit unusual instances also
modify formatting slightly to be more uniform (and in
some cases, correct). This includes adding some $FreeBSD$
tags, and most importantly moving rcvar= to right after
name= so it's clear that one is derived from the other.
2012-01-14 08:57:23 +00:00

39 lines
851 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: memcacheq
# 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 "-N -H /var/db/memcacheq -R -L 1024 -B 1024"
# memcacheq_user (user): Set user to run memcacheq.
# Default is "nobody".
#
. /etc/rc.subr
name="memcacheq"
rcvar=memcacheq_enable
sig_stop=KILL
load_rc_config ${name}
: ${memcacheq_enable="NO"}
: ${memcacheq_user="nobody"}
: ${memcacheq_flags="-N -H /var/db/memcacheq -R -L 1024 -B 1024"}
start_precmd="install -d -o $memcacheq_user -g wheel -m 700 /var/run/${name}"
command=%%PREFIX%%/bin/memcacheq
command_args="-u ${memcacheq_user} -P /var/run/${name}/${name}.pid -d"
run_rc_command "$1"