blob: 464cb9521f115d64a714f69932ed0c6390fd57ec (
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
33
34
35
36
37
38
39
40
41
42
43
44
|
#!/bin/sh
# PROVIDE: ircd-ratbox
# REQUIRE: DAEMON
# BEFORE: LOGIN
. /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"}
conftest_cmd="ircd_ratbox_conftest"
command="%%PREFIX%%/bin/ircd"
pidfile=%%RUNDIR%%/ircd.pid
required_files="%%PREFIX%%/etc/ircd-ratbox/ircd.conf"
start_precmd=prestart
stop_precmd=prestop
prestart()
{
touch $pidfile
chown $ircd_ratbox_user:$ircd_ratbox_group $pidfile
}
prestop()
{
rm -f $pidfile
}
ircd_ratbox_conftest()
{
echo "Starting ircd-ratbox in configuration test only mode."
command_args="-conftest"
run_rc_command "start"
}
extra_commands="conftest"
run_rc_command "$1"
|