1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-29 01:13:08 +00:00
freebsd-ports/irc/znc/files/znc.in
William Grzybowski ea6f0fdd1e irc/znc: add rc.d script
- Add rc.d script

PR:		ports/179190
Approved by:	maintainer (timeout)
2013-06-27 12:36:31 +00:00

37 lines
825 B
Bash

#!/bin/sh
#
# PROVIDE: znc
# REQUIRE: LOGIN DAEMON
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable znc:
#
# znc_enable: Set to NO by default. Set it to YES to enable it.
# znc_conf_dir: Directory where znc configuration
# data is stored.
# Default: %%PREFIX%%/etc/znc
# znc_user: The user account znc runs as what
# you want it to be. It uses 'znc' user by
# default. Do not sets it as empty or it will run
# as root.
#
. /etc/rc.subr
name=znc
rcvar=${name}_enable
command=%%PREFIX%%/bin/znc
load_rc_config ${name}
: ${znc_enable:="NO"}
: ${znc_user:="znc"}
: ${znc_conf_dir="%%PREFIX%%/etc/znc"}
znc_flags=" \
${znc_conf_dir:+-d ${znc_conf_dir}} \
${znc_flags}"
run_rc_command "$1"