mirror of
https://git.freebsd.org/ports.git
synced 2025-06-16 02:00:30 -04:00
* Port now installs unrealircdctl helper and the unrealircd helper script * Adjustments to port Makefile layout Co-authored with port maintainer (previous iteration) and additional improvements by committer Changelog: https://forums.unrealircd.org/viewtopic.php?t=9390 PR: 275987 Reviewed by: tanawts@gmail.com (maintainer) Tested by: tanawts@gmail.com (maintainer)
38 lines
791 B
Bash
38 lines
791 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/unrealircd
|
|
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"
|