opnsense-ports/databases/memcacheq/files/memcacheq.in
Franco Fichtner 8cb1a96ede ports: pull in a snapshot of the FreeBSD ports tree
Taken from:	https://github.com/freebsd/freebsd-ports.git
Commit id:	5070672073b68be364139bc6b3a89100bd17d331
2014-11-09 14:03:21 +01:00

38 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"