I'd like to run varnishncsa with some query options on startup:

varnishncsa  -a -w ${LOGFILE} -D -P ${PIDFILE} -q 'RespStatus >= 400'"

I can't seem to get the special character escaped properly in
/etc/default/varnishncsa using Ubuntu LTS 14.04.

I have tried quite a few variation of things like:
DAEMON_OPTS=" -a -w ${LOGFILE} -D -P ${PIDFILE} -q \\\'RespStatus \\\>\\\=
400\\\'"

I can get it to work by adding a string in /etc/init.d/varnishncsa :

QUERY="'RespStatus >= 400'"

And modifying the start function:

if start-stop-daemon --start --quiet --pidfile ${PIDFILE}  -q ${QUERY} \

Anyone have any suggestion on how to properly escape a query string in the
/etc/default/varnishncsa

Cheers,
Paul
-- 

Paul Wolstenholme
CBC Music - System Administrator
CBC  Vancouver
604.662.6632
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to