From cf95eadb8564554791cefcc62fe0e4d370b5620b Mon Sep 17 00:00:00 2001 From: Askdaddy Date: Wed, 28 Dec 2016 11:13:17 +0800 Subject: [PATCH] mv params -Ds from tail to header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When I use option `—` with systems.service, the -Ds option misread a cfg file path. --- src/haproxy-systemd-wrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/haproxy-systemd-wrapper.c b/src/haproxy-systemd-wrapper.c index e588af93..72b02b71 100644 --- a/src/haproxy-systemd-wrapper.c +++ b/src/haproxy-systemd-wrapper.c @@ -78,9 +78,9 @@ static void spawn_haproxy(char **pid_strv, int nb_pid) int argno = 0; locate_haproxy(haproxy_bin, 512); argv[argno++] = haproxy_bin; + argv[argno++] = "-Ds"; for (i = 0; i < main_argc; ++i) argv[argno++] = main_argv[i]; - argv[argno++] = "-Ds"; if (nb_pid > 0) { argv[argno++] = "-sf"; for (i = 0; i < nb_pid; ++i)