static void
varnish_start(struct varnish *v)
{
+ unsigned u;
if (v->cli_fd < 0)
varnish_launch(v);
printf("## %-4s Start\n", v->name);
- varnish_ask_cli(v, "start", NULL);
+ u = varnish_ask_cli(v, "start", NULL);
+ assert(u == CLIS_OK);
+ u = varnish_ask_cli(v, "debug.xid 1000", NULL);
+ assert(u == CLIS_OK);
}
/**********************************************************************
printf("## %-4s R %d Status: %04x\n", v->name, r, status);
}
+/**********************************************************************
+ * Ask a CLI question
+ */
+
+static void
+varnish_cli(struct varnish *v, const char *cli)
+{
+ unsigned u;
+
+ if (v->cli_fd < 0)
+ varnish_launch(v);
+ u = varnish_ask_cli(v, cli, NULL);
+ printf("## %-4s CLI %03u <%s>\n", v->name, u, cli);
+}
+
/**********************************************************************
* Load a VCL program
*/
av++;
continue;
}
+ if (!strcmp(*av, "-cli")) {
+ varnish_cli(v, av[1]);
+ av++;
+ continue;
+ }
if (!strcmp(*av, "-launch")) {
varnish_launch(v);
continue;