ports/irc/ircd-ratbox/files/ircd-ratbox.in
Doug Barton 9aac569eaa Move the rc.d scripts of the form *.sh.in to *.in
Where necessary add $FreeBSD$ to the file

No PORTREVISION bump necessary because this is a no-op
2012-08-05 23:19:36 +00:00

37 lines
598 B
Bash

#!/bin/sh
# $FreeBSD$
#
# PROVIDE: ircd-ratbox
# REQUIRE: DAEMON
# BEFORE: LOGIN
. /etc/rc.subr
name="ircd_ratbox"
rcvar=ircd_ratbox_enable
load_rc_config $name
ircd_ratbox_enable=${ircd_ratbox_enable:-"NO"}
ircd_ratbox_user=${ircd_ratbox_user:-"ircd"}
ircd_ratbox_group=${ircd_ratbox_group:-"ircd"}
command="%%PREFIX%%/bin/ircd"
pidfile=%%RUNDIR%%/ircd.pid
required_files="%%PREFIX%%/etc/ircd-ratbox/ircd.conf"
start_precmd=prestart
stop_precmd=prestop
prestart()
{
touch $pidfile
chown $ircd_ratbox_user:$ircd_ratbox_group $pidfile
}
prestop()
{
rm -f $pidfile
}
run_rc_command "$1"