ports/179190: [PATCH] Added rc.d script for irc/znc port

Hakisho Nukama nukama at gmail.com
Sun Jun 2 05:10:01 UTC 2013


>Number:         179190
>Category:       ports
>Synopsis:       [PATCH] Added rc.d script for irc/znc port
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 02 05:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Hakisho Nukama
>Release:        9.1-RELEASE
>Organization:
n/a
>Environment:
>Description:
rc.d script for starting znc as a service.
>How-To-Repeat:
https://redports.org/buildarchive/20130602040201-21978/
>Fix:


Patch attached with submission follows:

Index: Makefile
===================================================================
--- /usr/ports/irc/znc/Makefile	(revision 0)
+++ /usr/ports/irc/znc/Makefile	(working copy)
@@ -14,6 +14,7 @@
 
 FETCH_ARGS=	-Fpr
 GNU_CONFIGURE=	yes
+USE_RC_SUBR=	znc
 USES=		pkgconfig iconv
 USE_GMAKE=	yes
 WANT_PERL=	yes
Index: files/znc.in
===================================================================
--- /usr/ports/irc/znc/files/znc.in (revision 0)
+++ /usr/ports/irc/znc/files/znc.in (working copy)
@@ -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: /usr/local/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=/usr/local/bin/znc
+
+load_rc_config ${name}
+
+: ${znc_enable:="NO"}
+: ${znc_user:="znc"}
+: ${znc_conf_dir="/usr/local/etc/znc"}
+
+znc_flags=" \
+	${znc_conf_dir:+-d ${znc_conf_dir}} \
+	${znc_flags}"
+
+run_rc_command "$1"


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list