#!/bin/sh # # $FreeBSD: head/databases/memcacheq/files/memcacheq.in 340872 2014-01-24 00:14:07Z mat $ # # 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"