1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-14 07:43:06 +00:00
freebsd-ports/net/nsq/files/nsqd.in
Kris Moore 18003ee998 NSQ is a realtime distributed messaging platform designed to operate at scale,
handling billions of messages per day.

WWW: https://nsq.io

PR: 216188
Submitted by: John Hixson <jhixson@gmail.com>
2017-01-18 20:35:09 +00:00

40 lines
602 B
Bash

#!/bin/sh
# $FreeBSD$
#
# PROVIDE: nsqd
# REQUIRE: LOGIN
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf to enable nsqd:
# nsqd_enable="YES"
# nsqd_args="<set as needed>"
. /etc/rc.subr
name=nsqd
rcvar=nsqd_enable
load_rc_config $name
: ${nsqd_enable:="NO"}
: ${nsqd_args:=""}
pidfile=/var/run/nsqd.pid
procname="%%PREFIX%%/bin/nsqd"
command="/usr/sbin/daemon"
command_args="-f -p ${pidfile} ${procname} ${nsqd_args}"
start_precmd="nsqd_prestart"
nsqd_prestart()
{
if [ ! -d /var/db/nsq/nsqd ] ; then
mkdir -p /var/db/nsq/nsqd
fi
cd /var/db/nsq/nsqd
}
run_rc_command "$1"