diff options
Diffstat (limited to 'www/varnish')
-rw-r--r-- | www/varnish/Makefile | 5 | ||||
-rw-r--r-- | www/varnish/files/smf/manifest.xml | 36 |
2 files changed, 40 insertions, 1 deletions
diff --git a/www/varnish/Makefile b/www/varnish/Makefile index 37516399489..bee7c5c6fd1 100644 --- a/www/varnish/Makefile +++ b/www/varnish/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.19 2013/12/11 16:13:22 fhajny Exp $ +# $NetBSD: Makefile,v 1.20 2014/03/11 14:34:41 jperkin Exp $ # DISTNAME= varnish-3.0.5 @@ -34,6 +34,9 @@ PKG_HOME.${VRNUSER}= ${VRNDIR} PKG_SHELL.${VRNUSER}= ${SH} PKG_GECOS.${VRNUSER}= Varnish daemon user +FILES_SUBST+= VRNUSER=${VRNUSER} +FILES_SUBST+= VRNGROUP=${VRNGROUP} + RCD_SCRIPTS= varnishd varnishlog varnishncsa PYTHON_FOR_BUILD_ONLY= yes diff --git a/www/varnish/files/smf/manifest.xml b/www/varnish/files/smf/manifest.xml new file mode 100644 index 00000000000..d374d5a98a4 --- /dev/null +++ b/www/varnish/files/smf/manifest.xml @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> +<service_bundle type="manifest" name="varnish"> + <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1"> + <create_default_instance enabled="false" /> + <single_instance /> + <dependency name="network" grouping="require_all" restart_on="error" type="service"> + <service_fmri value="svc:/milestone/network:default" /> + </dependency> + <dependency name="filesystem" grouping="require_all" restart_on="error" type="service"> + <service_fmri value="svc:/system/filesystem/local" /> + </dependency> + <method_context> + <method_environment> + <envvar name='PATH' value='@PREFIX@/sbin:@PREFIX@/bin:/sbin:/usr/sbin:/usr/bin' /> + </method_environment> + </method_context> + <exec_method type="method" name="start" exec="@PREFIX@/sbin/varnishd -a %{listen} -l %{size} -f %{config_file} -u @VRNUSER@ -g @VRNGROUP@" timeout_seconds="60" /> + <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" /> + <property_group name="startd" type="framework"> + <propval name="duration" type="astring" value="contract" /> + <propval name="ignore_error" type="astring" value="core,signal" /> + </property_group> + <property_group name="application" type="application"> + <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/default.vcl" /> + <propval name="listen" type="astring" value="0.0.0.0:8080" /> + <propval name="size" type="astring" value="64M" /> + </property_group> + <stability value="Evolving" /> + <template> + <common_name> + <loctext xml:lang="C">Varnish daemon</loctext> + </common_name> + </template> + </service> +</service_bundle> |