From ea30afc7785b4821628b194f0ff2f60c88337973 Mon Sep 17 00:00:00 2001 From: Leonardo Arena Date: Thu, 14 Jun 2012 14:29:25 +0000 Subject: testing/varnish: create log dir and add reload function --- testing/varnish/APKBUILD | 9 +++++---- testing/varnish/varnishd.confd | 5 ++++- testing/varnish/varnishd.initd | 7 +++++++ 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/testing/varnish/APKBUILD b/testing/varnish/APKBUILD index a6207a8446..81af6dd85c 100644 --- a/testing/varnish/APKBUILD +++ b/testing/varnish/APKBUILD @@ -1,8 +1,8 @@ -# Contributor: Natanael Copa +# Contributor: Leonardo Arena # Maintainer: Natanael Copa pkgname=varnish pkgver=3.0.2 -pkgrel=2 +pkgrel=3 pkgdesc="High-performance HTTP accelerator" url="http://www.varnish-cache.org/" arch="all" @@ -49,6 +49,7 @@ package() { || return 1 install -Dm644 "$srcdir"/varnishd.logrotate \ "$pkgdir"/etc/logrotate.d/varnishd || return 1 + mkdir -p "$pkgdir"/var/log/varnish find "$pkgdir" -name *.la -print | xargs rm } @@ -59,6 +60,6 @@ libs() { } md5sums="c8eae0aabbe66b6daabdf3a1f58cd47a varnish-3.0.2.tar.gz -a86ece4df03e2643d4d659fb841e1ea6 varnishd.initd -78bc033e92dc6153656408f44b1d1df8 varnishd.confd +c3f2079a6e42e2c673a6e83e0744ca1b varnishd.initd +69869d23bacd4e3aaf060d1fedb79ac6 varnishd.confd a6cb8a43c9465699cf956dc992998225 varnishd.logrotate" diff --git a/testing/varnish/varnishd.confd b/testing/varnish/varnishd.confd index c2eb140db7..ebce5948ca 100644 --- a/testing/varnish/varnishd.confd +++ b/testing/varnish/varnishd.confd @@ -1,8 +1,11 @@ # /etc/conf.d/varnishd +ADMINHOSTPORT="127.0.0.1:65080" +CFG_FILE="/etc/varnish/default.vcl" + # options passed to varnish on startup # please see the varnishd man page for more options -VARNISHD_OPTS="-a 127.0.0.1:8080 -b 127.0.0.1:80" +VARNISHD_OPTS="-a 127.0.0.1:8080 -b 127.0.0.1:80 -T $ADMINHOSTPORT" # arguments passed to varnishncsa # please see the varnishncsa man page for more options diff --git a/testing/varnish/varnishd.initd b/testing/varnish/varnishd.initd index f65cce7122..471d8e489f 100755 --- a/testing/varnish/varnishd.initd +++ b/testing/varnish/varnishd.initd @@ -32,3 +32,10 @@ stop() { eend $? fi } + +reload() { + ebegin "Reloading varnish" + /usr/bin/varnishadm -T $ADMINHOSTPORT vcl.load reload$NOW $CFG_FILE + /usr/bin/varnishadm -T $ADMINHOSTPORT vcl.use reload$NOW $CFG_FILE + eend $? +} -- cgit v1.2.3