Browse Source

* fix token subst in 'exec' backend

master
Alex 'AdUser' Z 9 years ago
parent
commit
8975f2c8b6
  1. 4
      src/backends/exec.c

4
src/backends/exec.c

@ -107,9 +107,9 @@ cmd_list_exec(const cfg_t *cfg, cmd_t *list, const char *ip) {
if (pid == 0) { if (pid == 0) {
/* child */ /* child */
if (cmd->pos_ip && ip) if (cmd->pos_ip && ip)
cmd->argv[cmd->pos_ip - 1] = strdup(ip); cmd->argv[cmd->pos_ip] = strdup(ip);
if (cmd->pos_id) if (cmd->pos_id)
cmd->argv[cmd->pos_ip - 1] = strdup(cfg->name); cmd->argv[cmd->pos_id] = strdup(cfg->name);
if (cfg->timeout) if (cfg->timeout)
alarm(cfg->timeout); alarm(cfg->timeout);
execv(cmd->args, cmd->argv); execv(cmd->args, cmd->argv);

Loading…
Cancel
Save