Changelog: https://github.com/ngircd/ngircd/releases/tag/rel-27 Change maintainership: * all commits from 2017 are "maintainer timeout" or "portmgr blanket": https://cgit.freebsd.org/ports/log/irc/ngircd https://www.freshports.org/irc/ngircd/ * fgsch@lodoss.net - no user in bugzilla with this email Port changes: * Add a dedicated system user/group pair for better daemon permissions * Move PLIST files into pkg-plist for better conditional installation of files * Fix installation of documentation files to %%DOCSDIR%% * Put configuration file (and sample) into %%ETCDIR%% * Run a --configtest before starting daemon for sanity check * Replace PORTVERSION with DISTVERSION * Remove GNU_CONFIGURE_MANPREFIX * Sort options to make happy portclippy PR: 278919
41 lines
857 B
Bash
41 lines
857 B
Bash
#!/bin/sh
|
|
|
|
# PROVIDE: ngircd
|
|
# REQUIRE: DAEMON
|
|
# KEYWORD: shutdown
|
|
#
|
|
# Add the following lines to /etc/rc.conf to run ngircd:
|
|
#
|
|
# ngircd_enable (bool): Set it to "YES" to enable ngircd.
|
|
# Default is "NO".
|
|
# ngircd_conf (file): Set local of config file.
|
|
# Default is "%%ETCDIR%%/ngircd.conf".
|
|
# ngircd_flags (flags): Set extra flags here. More options in ngircd(1)
|
|
# Default is empty "".
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="ngircd"
|
|
rcvar="ngircd_enable"
|
|
|
|
load_rc_config $name
|
|
|
|
: ${ngircd_enable="NO"}
|
|
: ${ngircd_conf="%%ETCDIR%%/ngircd.conf"}
|
|
|
|
required_files="${ngircd_conf}"
|
|
command=%%PREFIX%%/sbin/ngircd
|
|
command_args="--config ${ngircd_conf}"
|
|
start_precmd=do_precmd
|
|
|
|
do_precmd()
|
|
{
|
|
if ! ${command} ${command_args} --configtest > /dev/null; then
|
|
echo "ERROR: '${ngircd_conf}' incorrectly configured" >&2
|
|
exit 78 # EX_CONFIG
|
|
fi
|
|
}
|
|
|
|
run_rc_command "$1"
|