ffea24219b
Cleanups in several places
37 lines
693 B
Bash
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
|