blob: 71324c9d8be30b346f492b2c9e169478cfd90b41 (
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
|
#!/bin/sh
# PROVIDE: unrealircd
# REQUIRE: NETWORKING SERVERS
# BEFORE: DAEMON
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable Unreal IRCd:
# unrealircd_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable Unreal IRCd
#
. /etc/rc.subr
name=unrealircd
rcvar=unrealircd_enable
load_rc_config $name
: ${unrealircd_enable:=NO}
command=%%PREFIX%%/libexec/ircd
pidfile=%%RUNDIR%%/ircd.pid
start_precmd=unreal_prestart
required_files="%%PREFIX%%/etc/Unreal/unrealircd.conf"
unreal_prestart()
{
if [ ! -d ${pidfile%/*} ]; then
install -d -o %%USERS%% -g %%GROUPS%% ${pidfile%/*}
install -d -o %%USERS%% -g %%GROUPS%% ${pidfile%/*}/tmp
fi
}
run_rc_command "$1"
|