- if (path_cli) path_cli= xasprintf("%s_cli", feedfile);
- else assemble_path(&path_cli, "%s_cli", "cli socket path");
+ if (!path_run)
+ path_run= innconf->pathrun;
+
+ if (!feedfile) feedfile= sitename;
+ if (!feedfile[0]) badusage("feed filename, if specified, must be nonempty");
+ if (path_ends_slash(feedfile))
+ feedfile= masprintf("%s%s", feedfile, sitename);
+ if (feedfile[0] != '/')
+ feedfile= masprintf("%s/%s", innconf->pathoutgoing, feedfile);
+
+ if (!path_cli) {
+ path_cli_dir= "innduct";
+ } else if (!path_cli[0] || !strcmp(path_cli,"none")) {
+ path_cli= 0; /* ok, don't then */
+ } else if (path_ends_slash(path_cli)) {
+ path_cli_dir= masprintf("%.*s", strlen(path_cli)-1, path_cli);
+ }
+ if (path_cli_dir)
+ path_cli= masprintf("%s/%s", path_cli_dir, sitename);