aboutsummaryrefslogtreecommitdiff
path: root/irc/znc
diff options
context:
space:
mode:
authorWilliam Grzybowski <wg@FreeBSD.org>2013-06-27 12:36:31 +0000
committerWilliam Grzybowski <wg@FreeBSD.org>2013-06-27 12:36:31 +0000
commitea6f0fdd1e9edb048f5bb0f2c9a74836be15f5e4 (patch)
tree012dd0e90ae9d986d5826cde3affaa2924a578c9 /irc/znc
parent245c2b1169420f8db7c79586d72c17c9575c2c7f (diff)
downloadports-ea6f0fdd1e9edb048f5bb0f2c9a74836be15f5e4.tar.gz
ports-ea6f0fdd1e9edb048f5bb0f2c9a74836be15f5e4.zip
Notes
Diffstat (limited to 'irc/znc')
-rw-r--r--irc/znc/Makefile1
-rw-r--r--irc/znc/files/znc.in36
2 files changed, 37 insertions, 0 deletions
diff --git a/irc/znc/Makefile b/irc/znc/Makefile
index eff728ca0366..067251a66052 100644
--- a/irc/znc/Makefile
+++ b/irc/znc/Makefile
@@ -14,6 +14,7 @@ LICENSE= GPLv2
FETCH_ARGS= -Fpr
GNU_CONFIGURE= yes
+USE_RC_SUBR= znc
USES= pkgconfig iconv
USE_GMAKE= yes
WANT_PERL= yes
diff --git a/irc/znc/files/znc.in b/irc/znc/files/znc.in
new file mode 100644
index 000000000000..93b16b316421
--- /dev/null
+++ b/irc/znc/files/znc.in
@@ -0,0 +1,36 @@
+#!/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"