ports/irc/unreal/files/unrealircd.in
Gert Doering 9a8cdd8646 irc/unreal: Update to 6.1.8.1
* 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)
2024-12-22 00:06:55 +01:00

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"