#!/bin/sh
#
# $NetBSD: unrealircd.sh,v 1.1 2022/03/04 08:44:33 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="/var/run/unrealircd.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"
