2005-09-16 10:22:53 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2012-08-06 01:19:36 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
#
|
2005-09-16 10:22:53 +02:00
|
|
|
# PROVIDE: ircd-hybrid
|
|
|
|
# REQUIRE: DAEMON
|
|
|
|
# BEFORE: LOGIN
|
2006-02-20 21:47:50 +01:00
|
|
|
# KEYWORD: shutdown
|
2005-09-16 10:22:53 +02:00
|
|
|
|
|
|
|
# To get ircd-hybrid enabled at boot, add the following lines to /etc/rc.conf :
|
|
|
|
# ircd_hybrid_enable (bool): Set to "NO" by default.
|
|
|
|
# Set it to "YES" to enable ircd-hybrid.
|
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name="ircd_hybrid"
|
2012-01-14 09:57:23 +01:00
|
|
|
rcvar=ircd_hybrid_enable
|
2005-09-16 10:22:53 +02:00
|
|
|
|
|
|
|
command=/usr/local/bin/ircd
|
|
|
|
pidfile=/var/run/ircd/ircd.pid
|
|
|
|
required_files=/usr/local/etc/ircd-hybrid/ircd.conf
|
|
|
|
|
|
|
|
start_precmd=pid_touch
|
|
|
|
stop_postcmd=pid_rm
|
|
|
|
|
|
|
|
[ -z "$ircd_hybrid_enable" ] && ircd_hybrid_enable=NO
|
|
|
|
[ -z "$ircd_hybrid_user" ] && ircd_hybrid_user=ircd
|
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
|
|
|
|
pid_touch ()
|
|
|
|
{
|
|
|
|
touch $pidfile
|
|
|
|
chown $ircd_hybrid_user $pidfile
|
|
|
|
}
|
|
|
|
|
|
|
|
pid_rm ()
|
|
|
|
{
|
|
|
|
rm $pidfile
|
|
|
|
}
|
|
|
|
|
|
|
|
run_rc_command "$1"
|