ports/105743: [patch] ports/www/varnish add rc-ng script
Sten Spans
sten at mx0.blinkenlights.nl
Wed Nov 22 12:30:16 UTC 2006
>Number: 105743
>Category: ports
>Synopsis: [patch] ports/www/varnish add rc-ng script
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Wed Nov 22 12:30:12 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Sten Spans
>Release: FreeBSD 6.1-RELEASE-p7 i386
>Organization:
>Environment:
System: FreeBSD earth.blinkenlights.nl 6.1-RELEASE-p7 FreeBSD 6.1-RELEASE-p7 #0: Sun Sep 24 14:42:21 CEST 2006 root at earth.blinkenlights.nl:/usr/obj/usr/src/sys/1650 i386
>Description:
the varnish port currently doesn't include a startup-script, which makes
controling the daemon somewhat awkward.
>How-To-Repeat:
>Fix:
the following diff adds an rc-ng script and bumps portrevision.
--- Makefile.orig Wed Nov 15 04:11:56 2006
+++ Makefile Wed Nov 22 13:02:09 2006
@@ -7,7 +7,7 @@
PORTNAME= varnish
PORTVERSION= 1.0.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -23,6 +23,7 @@
MAN1= varnishd.1 varnishhist.1 varnishlog.1 varnishncsa.1 \
varnishstat.1 varnishtop.1
MAN7= vcl.7
+USE_RC_SUBR+= varnishd
.include <bsd.port.pre.mk>
--- files/varnishd.in Thu Jan 1 01:00:00 1970
+++ files/varnishd.in Wed Nov 22 13:00:27 2006
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# $$
+#
+
+# PROVIDE: varnishd
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable varnishd:
+#
+#varnishd_enable="YES"
+#
+# See varnishd(1) for flags.
+#
+
+. %%RC_SUBR%%
+
+name=varnishd
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/sbin/varnishd
+
+# set defaults
+
+varnishd_enable=${varnishd_enable:-"NO"}
+varnishd_flags=${varnishd_flags:-""}
+
+load_rc_config ${name}
+
+run_rc_command "$1"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list