#! /bin/sh # $FreeBSD$ # # PROVIDE: ircd # REQUIRE: LOGIN syslogd # KEYWORD: shutdown . /etc/rc.subr name="ircd" rcvar=ircd_enable command="%%PREFIX%%/sbin/$name" required_files="%%PREFIX%%/etc/ircd-ru/ircd.conf %%PREFIX%%/etc/ircd-ru/ircd.motd %%PREFIX%%/etc/ircd-ru/ircd.smotd" piddir="/var/run/ircd-ru" pidfile="$piddir/$name.pid" start_precmd=${name}_precmd ircd_precmd () { /usr/bin/install -d -o $ircd_user -g $ircd_group $piddir eval `/usr/bin/limits -U $ircd_user -e` } load_rc_config $name : ${ircd_enable="NO"} : ${ircd_user="ircd"} : ${ircd_group="ircd"} run_rc_command "$1"