aboutsummaryrefslogtreecommitdiffstats
path: root/main/varnish/varnishd.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-06-05 12:10:16 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-06-05 12:51:40 +0000
commit5b84c153c7ebe9a671ecfa512379f7751d5c299f (patch)
tree004cfad9735131df95012c58bdc4bbb82d6d323b /main/varnish/varnishd.initd
parentc7c8818b7203c5ff58dd5f7d03f7e47cb681348d (diff)
downloadaports-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
Diffstat (limited to 'main/varnish/varnishd.initd')
-rw-r--r--main/varnish/varnishd.initd8
1 files changed, 8 insertions, 0 deletions
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} \