#!/bin/sh
#
# $NetBSD: unrealircd.sh,v 1.4 2019/08/07 18:11:05 nia Exp $
#
# PROVIDE: unrealircd
# REQUIRE: DAEMON
# KEYWORD: shutdown
#

if [ -f /etc/rc.subr ]
then
	. /etc/rc.subr
fi

name="unrealircd"
rcvar=${name}
command="/usr/pkg/bin/unrealircd"
required_files="/usr/pkg/etc/unrealircd/unrealircd.conf"
pidfile="/usr/pkg/unrealircd/ircd.pid"
unrealircd_user="uircd"
unrealircd_group="uircd"
extra_commands="rehash"
rehash_cmd="unrealircd_rehash"

unrealircd_rehash()
{
	kill -1 `/bin/cat $pidfile`
}

load_rc_config $name
run_rc_command "$1"
