diff options
Diffstat (limited to 'irc/ircd-ratbox/files/ircd-ratbox.in')
-rw-r--r-- | irc/ircd-ratbox/files/ircd-ratbox.in | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/irc/ircd-ratbox/files/ircd-ratbox.in b/irc/ircd-ratbox/files/ircd-ratbox.in new file mode 100644 index 000000000000..f2e1e1609a9d --- /dev/null +++ b/irc/ircd-ratbox/files/ircd-ratbox.in @@ -0,0 +1,37 @@ +#!/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" |