banning in one line command

Miguel González miguel_3_gonzalez at yahoo.es
Wed Feb 1 17:29:45 CET 2017


On 02/01/17 5:24 PM, Miguel González wrote:
> On 02/01/17 5:08 PM, Dridi Boukelmoune wrote:
>>> What do you mean with the actual output? I get an empty string...
>>
>> For commands like param.show or backend.list that give you an output.
>>
>>> Is there any manual or information about this in the wiki?
>>
>> Please double check the varnishstat manual, if it's not mentioned let
>> me know and will push a docfix.
> 
> you mean varnishadm manual, this one:
> 
> https://varnish-cache.org/docs/4.1/reference/varnishadm.html
> 
> ?
> 
> My experience is that using a singleliner doesn´t work, cache is not
> banned. I thought It was the empty string output but considering your
> answer and the manual it supposedly works but it´s not actually banning
> the cache.

using quotes an after the example in the manual:

echo "ban req.http.host ~ myserver.com" | varnishadm -S /etc/varnish/secret
200


Before I was getting this error when not using commands for the echo
command (as showed in the example in the manual):

106
expected conditional (~, !~, == or !=) got "/root"

apparently this error is dued to the echo command and the use of
conditionals as ~

Thanks!

Miguel





More information about the varnish-misc mailing list