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