aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2012-06-14 14:29:25 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2012-06-14 14:30:06 +0000
commitea30afc7785b4821628b194f0ff2f60c88337973 (patch)
treedb132dde35aa39c85e20dcd484672034e5a8701f
parent77adad331a213656cca46e9ac1f5282d854a9f99 (diff)
downloadaports-ea30afc7785b4821628b194f0ff2f60c88337973.tar.bz2
aports-ea30afc7785b4821628b194f0ff2f60c88337973.tar.xz
testing/varnish: create log dir and add reload function
-rw-r--r--testing/varnish/APKBUILD9
-rw-r--r--testing/varnish/varnishd.confd5
-rwxr-xr-xtesting/varnish/varnishd.initd7
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 <ncopa@alpinelinux.org>
+# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
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 $?
+}