Hello,
i'm varnish newbie but still i added rc script and tried to handle
removal of /var/varnish but i still get following error:
Error deleting directory /var/varnish: Directory not empty
so it needs little touch.
jirib
#!/bin/sh
#
# $OpenBSD:
daemon="${TRUEPREFIX}/sbin/varnishd"
daemon_flags="-u _varnish -a 0.0.0.0:80 -f /etc/varnish/default.vcl"
. /etc/rc.d/rc.subr
pexp="varnishd: Varnish-Mgr"
rc_reload=NO
rc_reload() {
pkill -HUP -f "^${pexp}" && pkill -USR1 -f "^${pexp}"
}
rc_cmd $1
? pkg/varnish.rc
Index: Makefile
===================================================================
RCS file: /cvs/ports/www/varnish/Makefile,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile
--- Makefile 22 Nov 2010 08:36:55 -0000 1.8
+++ Makefile 28 Jun 2011 21:27:00 -0000
@@ -4,6 +4,7 @@ COMMENT = high-performance HTTP acceler
DISTNAME = varnish-2.1.3
CATEGORIES = www
+REVISION = 0
MAINTAINER = Jim Razmus II <[email protected]>
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/www/varnish/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- pkg/PLIST 11 Sep 2010 13:03:46 -0000 1.3
+++ pkg/PLIST 28 Jun 2011 21:27:00 -0000
@@ -1,6 +1,7 @@
@comment $OpenBSD: PLIST,v 1.3 2010/09/11 13:03:46 jim Exp $
@newgroup _varnish:625
@newuser _varnish:625:_varnish:daemon:Varnish
Cache:/var/varnish:/bin/sh +@extraunexec rm -rf /var/varnish/*
%%SHARED%%
@bin bin/varnishadm
@bin bin/varnishhist
@@ -45,5 +46,8 @@ share/examples/varnish/
@sample ${SYSCONFDIR}/varnish/
share/examples/varnish/default.vcl
@sample ${SYSCONFDIR}/varnish/default.vcl
-@exec-add mkdir -p /var/varnish
-@extraunexec rm -fr /var/varnish
+@mode 771
+@owner _varnish
+@group _varnish
+@sample /var/varnish/
+@rcscript ${RCDIR}/varnish