1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-13 07:34:50 +00:00
freebsd-ports/irc/unreal/files/unrealircd.in
Mark Felder 90b165a757 - Update to 3.2.10.1
- rc script cleanup

PR:		ports/177506
Submitted by:	JR Aquino <tanawts@gmail.com>
Approved by:	crees (mentor)
2013-09-27 19:47:16 +00:00

40 lines
725 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# 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"