ports/irc/unreal/files/unrealircd.in
JR Aquino cb44590896 irc/unreal: Unreal - the next generation ircd
A highly advanced IRCd with a strong focus on modularity and security.
Other key features include: full IRCv3 support, SSL/TLS, cloaking,
advanced anti-flood and anti-spam systems, GeoIP, remote includes,
and lots of other features.

WWW: https://www.unrealircd.org/

PR:		273461
2023-09-24 14:57:14 -04:00

38 lines
785 B
Bash

#!/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}
: ${unrealircd_pidfile="/var/run/ircd/ircd.pid"}
: ${unrealircd_user="ircd"}
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"