Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jun 2013 12:36:31 +0000 (UTC)
From:      William Grzybowski <wg@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r321885 - in head/irc/znc: . files
Message-ID:  <201306271236.r5RCaV0Z032713@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: wg
Date: Thu Jun 27 12:36:31 2013
New Revision: 321885
URL: http://svnweb.freebsd.org/changeset/ports/321885

Log:
  irc/znc: add rc.d script
  
  - Add rc.d script
  
  PR:		ports/179190
  Approved by:	maintainer (timeout)

Added:
  head/irc/znc/files/znc.in   (contents, props changed)
Modified:
  head/irc/znc/Makefile

Modified: head/irc/znc/Makefile
==============================================================================
--- head/irc/znc/Makefile	Thu Jun 27 12:27:07 2013	(r321884)
+++ head/irc/znc/Makefile	Thu Jun 27 12:36:31 2013	(r321885)
@@ -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

Added: head/irc/znc/files/znc.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/irc/znc/files/znc.in	Thu Jun 27 12:36:31 2013	(r321885)
@@ -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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306271236.r5RCaV0Z032713>