freebsd-ports/irc/charybdis/files/charybdis.in
Chris Rees ffea24219b Stage ports maintained by me in irc java mail
Cleanups in several places
2013-12-29 15:46:13 +00:00

37 lines
693 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: charybdis
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf or /etc/rc.conf.local to
# enable charybdis:
# charybdis_enable (bool): Set to "NO" by default.
#
. /etc/rc.subr
name=charybdis
rcvar=charybdis_enable
load_rc_config $name
: ${charybdis_enable:=NO}
: ${charybdis_user=ircd}
: ${charybdis_group=ircd}
command=%%PREFIX%%/bin/ircd
pidfile=/var/run/${name}/${name}.pid
command_args="-configfile %%ETCDIR%%/ircd.conf -pidfile ${pidfile}"
start_precmd=${name}_prestart
charybdis_prestart()
{
install -d -o ircd -m755 /var/run/${name} /var/log/${name} /var/db/${name}
chown -R ircd %%ETCDIR%%
}
run_rc_command $1