diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-06-05 12:10:16 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-06-05 12:51:40 +0000 |
commit | 5b84c153c7ebe9a671ecfa512379f7751d5c299f (patch) | |
tree | 004cfad9735131df95012c58bdc4bbb82d6d323b | |
parent | c7c8818b7203c5ff58dd5f7d03f7e47cb681348d (diff) | |
download | aports-5b84c153c7ebe9a671ecfa512379f7751d5c299f.tar.bz2 aports-5b84c153c7ebe9a671ecfa512379f7751d5c299f.tar.xz |
main/varnish: fix init.d script
we need to wait til varnish has started up properly before we can start
the logger
-rw-r--r-- | main/varnish/APKBUILD | 14 | ||||
-rw-r--r-- | main/varnish/varnishd.confd | 2 | ||||
-rw-r--r-- | main/varnish/varnishd.initd | 8 |
3 files changed, 16 insertions, 8 deletions
diff --git a/main/varnish/APKBUILD b/main/varnish/APKBUILD index d04085ee17..d667ed275a 100644 --- a/main/varnish/APKBUILD +++ b/main/varnish/APKBUILD @@ -3,7 +3,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=varnish pkgver=4.0.0 -pkgrel=1 +pkgrel=2 pkgdesc="High-performance HTTP accelerator" url="http://www.varnish-cache.org/" arch="all" @@ -83,20 +83,20 @@ geoip() { } md5sums="05af2deae29f37b166392a0237756250 varnish-4.0.0.tar.gz -d470dd6f893c1848c2d3f08ccb63d0d7 varnishd.initd -df8e6eb5591be4ab916ef4504b3ea05d varnishd.confd +7e5df695886d0932312c23e9908893fa varnishd.initd +1ed5a6de82e6204400229fa79a54d9a7 varnishd.confd a6cb8a43c9465699cf956dc992998225 varnishd.logrotate 2cbaa46b9da9f78ecf4c906730f7c5e3 maxminddb.vcl 54d12d231c505c95ae3ae09487b5dde4 musl-mode_t.patch" sha256sums="4bbf73656be11687cbb8c7d4a7315786081687664b40a8ccbe67b36f8c0b1c17 varnish-4.0.0.tar.gz -1f6473f3493a1ce9952218c96614e246445af17059fe06503f6532d5f5d65e3e varnishd.initd -24a9938a1d410579afd86507d645b4a27c36c99b3e73d966cdef15bd7f3c74ed varnishd.confd +8932b8095fc080911aeabeb9da3eb26cc96533cb6b9edbecb9ab0e8a6337f961 varnishd.initd +c252697811103e9846069b4d4de750105d79960a289ea1f7fcf1e99f682fb5dc varnishd.confd 017173cb42bb60f853063b7fbc843120c547e501233ce2299e1066b5d81e4d5e varnishd.logrotate fd6c810a6099b1b0c2eb572aec239e3f51debc52a6c32fce715f265d7b1a1f85 maxminddb.vcl f96b6dab0e68e169cffceb63776e312d8585bc2a46dfcc5fa2b1ec5e953ad624 musl-mode_t.patch" sha512sums="5eb3806f6c7c46438b6ebbe30c42f5a6afc53a9fa9e8f4b809c7d18b465712640950601be9873810a0f408865fba6ae9d18e46e4f22c89cc3a2e0c351753ac71 varnish-4.0.0.tar.gz -595b017bf890eaf6ffb9a35eef04983a85a1d90ddbfca835b4a003a7e78e1cf38d9910048fca5bb6a518e3480d6f1e23d1c3be1c1a47e7aafeac9b864c08e7c5 varnishd.initd -fd3d7e6fb8d0849533c0ad1ec0ba1d5221ac03bd2093052b72cd09f2276b16b888a145402507d18f4defd4ec4fd9b198ef5f87347d92e5fca43add30bb91956e varnishd.confd +0f4cf890254c0670b09d384b520e303b82b72234147b2d87a5199030032bbe7e6fa566e5a08af3a92e37f556a54252798268b64e8efb76b8b4141b25732529b3 varnishd.initd +f2b4f88c1cea5d8576bf5c6ea82ee841c1fa9dd10daaef668c262669c2d3bc9d151f3c491f8678717047cf0d161c25b4104dd4d29bc8ddb44dd749b7f58c39e7 varnishd.confd 8fb1cba86ede5eff28a494f6b1da1a651d66383cdeb63922104407f28903dea0c643155b6d7ac8353b8c63d480a6c5b43a70c7252bc51ee73317c33a1844c52c varnishd.logrotate 69f088819cff6d4441813be284f4117f232d08908515bd15d96bd5bb9d41ba7100657a52fd408d44c396d004366062ae22fbf08e2a983cd8023b554539ccf596 maxminddb.vcl 8758bef9039a2cca23b7302668bd49f1ea07f54835512a8a9558bb9ed5de1c0fca53f2085ccd298fe0c6579fc81c3b583a85f4f6b25b6ad85f89bf3be04afb70 musl-mode_t.patch" diff --git a/main/varnish/varnishd.confd b/main/varnish/varnishd.confd index 354247fc74..b51eda6be5 100644 --- a/main/varnish/varnishd.confd +++ b/main/varnish/varnishd.confd @@ -28,5 +28,5 @@ VARNISHD_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_PORT} -s ${VARNISH_STORAGE # arguments passed to varnishncsa # please see the varnishncsa man page for more options -VARNISHNCSA_ARGS="-c -a -w /var/log/varnish/${SVCNAME}.log" +VARNISHNCSA_ARGS="-a -w /var/log/varnish/${SVCNAME}.log" diff --git a/main/varnish/varnishd.initd b/main/varnish/varnishd.initd index 7c39a03964..6b8aa42619 100644 --- a/main/varnish/varnishd.initd +++ b/main/varnish/varnishd.initd @@ -59,6 +59,14 @@ start() { eend $? if [ "${VARNISHNCSA_ARGS}" != "" ]; then + # wait for varnish to start up + timeout=50 + while [ $timeout -gt 0 ]; do + /usr/bin/varnishadm 'vcl.list' >/dev/null 2>&1 && break + sleep 0.1 + timeout=$(( $timeout - 1 )) + done + ebegin "Starting varnish logging" start-stop-daemon --quiet --start \ --pidfile ${VARNISHNCSA_PID_FILE} \ |