On 02/01/17 4:25 PM, Dridi Boukelmoune wrote: > On Wed, Feb 1, 2017 at 3:31 PM, Miguel González > <[email protected]> wrote: >> Dear all, >> >> I have Varnish 4.1 and I´m trying to run in one single line command a >> ban for a particular website. If I run this: >> >> root@myserver [~] # varnishadm -T :6082 -S /etc/varnish/secret >> >> varnish> ban req.http.host ~ www.myserver.com >> 200 >> >> I get the 200 code. However If I run it in a single line I get no 200 >> return code: >> >> root@myserver [~] # varnishadm -T :6082 -S /etc/varnish/secret 'ban >> req.http.host ~ www.myserver.com' > > You probably don't need the -T arg for a local access. > >> I get nothing. If I try double quotes I get the same... >> >> I googled around and I find people asking the same but no solutions. >> >> What am I doing wrong? > > Nothing wrong: what you are seeing in varnishadm's interactive shell > is the response status from varnish (see man varnish-cli) but when you > use varnishadm as a scripting command, only the actual output is > shown. >
Thanks for answering! What do you mean with the actual output? I get an empty string... Is there any manual or information about this in the wiki? Thanks _______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
