Commit ea30afc7 authored by Leonardo Arena's avatar Leonardo Arena

testing/varnish: create log dir and add reload function

parent 77adad33
# 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"
# /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
......
......@@ -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 $?
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment