blob: 8ea64d946a18911c5e8cd1653998bc7cd4f550c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#!/bin/sh
# PROVIDE: ircd-ratbox
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
. /etc/rc.subr
name=ircd_ratbox
rcvar=ircd_ratbox_enable
load_rc_config $name
ircd_ratbox_enable=${ircd_ratbox_enable:-"NO"}
ircd_ratbox_user=${ircd_ratbox_user:-"ircd"}
ircd_ratbox_group=${ircd_ratbox_group:-"ircd"}
command="%%PREFIX%%/bin/ircd"
pidfile=%%RUNDIR%%/ircd.pid
required_files="%%PREFIX%%/etc/ircd-ratbox/ircd.conf"
start_precmd=prestart
stop_precmd="rm -f ${pidfile}"
prestart()
{
for i in %%LOGDIR%% %%DBDIR%% %%RUNDIR%%; do
install -d -o ${ircd_ratbox_user} -g ${ircd_ratbox_group} ${i}
done
}
run_rc_command "$1"
|